Re: [hybi] [whatwg] Web sockets and existing HTTP stacks

Jamie Lokier <jamie@shareable.org> Sat, 19 December 2009 05:28 UTC

Return-Path: <jamie@shareable.org>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6601C3A67CC for <hybi@core3.amsl.com>; Fri, 18 Dec 2009 21:28:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.299
X-Spam-Level:
X-Spam-Status: No, score=-3.299 tagged_above=-999 required=5 tests=[AWL=-0.700, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DMEtJJ3-NN0D for <hybi@core3.amsl.com>; Fri, 18 Dec 2009 21:28:27 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 717DE3A67C2 for <hybi@ietf.org>; Fri, 18 Dec 2009 21:28:27 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1NLrrK-0003vm-Q8; Sat, 19 Dec 2009 05:28:06 +0000
Date: Sat, 19 Dec 2009 05:28:06 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Justin Erenkrantz <justin@erenkrantz.com>
Message-ID: <20091219052806.GA14916@shareable.org>
References: <557ae280911171402v7546e5e7n93a1e57f87dc10e5@mail.gmail.com> <557ae280911200711i5493e654k67c1f5f07336bfb9@mail.gmail.com> <Pine.LNX.4.62.0912032347360.15540@hixie.dreamhostps.com> <4B2C1D52.9020505@webtide.com> <5c902b9e0912181640n497169cdrfa71f9a2908e6ef3@mail.gmail.com> <20091219005442.GA10949@shareable.org> <5c902b9e0912181711o65f31266yd86b8db618a1dcb1@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <5c902b9e0912181711o65f31266yd86b8db618a1dcb1@mail.gmail.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: whatwg@whatwg.org, Boris Zbarsky <bzbarsky@mit.edu>, hybi@ietf.org, wfernandom2004@gmail.com
Subject: Re: [hybi] [whatwg] Web sockets and existing HTTP stacks
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 19 Dec 2009 05:28:28 -0000

Justin Erenkrantz wrote:
> On Fri, Dec 18, 2009 at 4:54 PM, Jamie Lokier <jamie@shareable.org> wrote:
> > Given WebSocket's stated goals (on this list) of:
> >
> >   - Not working through HTTP proxies, including intercepting proxies.
> >   - Not being HTTP compatible.
> >   - Not being correctly parsable by a correct HTTP request parser.
> >
> > I'm thinking it would be easier to just use port 81 and be done with it.
> 
> Proxies (mainly reverse proxies) and caching are incredibly important
> to any real scalability efforts.  I'm not aware of many high-traffic
> web setups that don't rely upon massive amounts of front-ends.  So,
> any port 80 traffic to any big sites is very likely to hit an hardware
> box (F5, etc.) or a software balancer (a la mod_proxy or varnish or
> squid).  If the current WebSockets ID is intended to *fail* in those
> situations, the deployment story is likely to be a real non-starter...

(Note that I prefer BWTP myself; I'm just describing WebSocket).

It fails early because the alternative, for a pure HTTP proxy, is
unpredictable behaviour when it sees bidirectional messages later.
Failing early is a good thing!

It won't fail if the proxy explicitly supports WebSocket, so adding
that support is the intended solution, I believe.

A pure HTTP proxy cannot carry any of the protocols under discussion,
except for those designed to look like normal HTTP unidirectional
request-response pairs ("polling", "long GET" and "streaming GET"),
which are already widely implemented.

If you are looking for an efficient bidirectional messaging protocol
which works with pure HTTP proxies, not modified to support the
bidirectional protocol, what do you suggest?

> I'm curious what the makeup of this hybi@ list/WG is - how many server
> or intermediary devs are on this?  From browsing the archives, it
> looks like it is mostly browser/user-agent developers so far.

I'd say there are many server and application developers on the list
(including me), but the WebSocket protocol appears to be more driven
from the browser API side.  It is explicitly designed to support a
Javascript API, and pays little attention to issues like network
performance and scalability.

-- Jamie