Re: [hybi] Is there a traffic jam?

Ian Hickson <ian@hixie.ch> Tue, 14 April 2009 02:54 UTC

Return-Path: <ian@hixie.ch>
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 85B583A6A26 for <hybi@core3.amsl.com>; Mon, 13 Apr 2009 19:54:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.313
X-Spam-Level:
X-Spam-Status: No, score=-3.313 tagged_above=-999 required=5 tests=[AWL=-0.714, 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 ZJCFBP1Ggh7P for <hybi@core3.amsl.com>; Mon, 13 Apr 2009 19:54:14 -0700 (PDT)
Received: from looneymail-a3.g.dreamhost.com (caibbdcaaaaf.dreamhost.com [208.113.200.5]) by core3.amsl.com (Postfix) with ESMTP id 76FD53A6863 for <hybi@ietf.org>; Mon, 13 Apr 2009 19:54:14 -0700 (PDT)
Received: from hixie.dreamhostps.com (hixie.dreamhost.com [208.113.210.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by looneymail-a3.g.dreamhost.com (Postfix) with ESMTP id 66AC527B5A; Mon, 13 Apr 2009 19:55:25 -0700 (PDT)
Date: Tue, 14 Apr 2009 02:55:25 +0000
From: Ian Hickson <ian@hixie.ch>
To: Greg Wilkins <gregw@webtide.com>
In-Reply-To: <49E3F218.4080209@webtide.com>
Message-ID: <Pine.LNX.4.62.0904140248050.10339@hixie.dreamhostps.com>
References: <03BCE29D-7AA5-4128-9F61-446E0229479A@lindenlab.com> <E51D5B15BFDEFD448F90BDD17D41CFF105A0C46E@AHQEX1.andrew.com> <Pine.LNX.4.62.0904132352430.10339@hixie.dreamhostps.com> <E51D5B15BFDEFD448F90BDD17D41CFF105A0C476@AHQEX1.andrew.com> <Pine.LNX.4.62.0904140002360.10339@hixie.dreamhostps.com> <1cb725390904131712k292a4860pbd078bb251d3855b@mail.gmail.com> <Pine.LNX.4.62.0904140031040.10339@hixie.dreamhostps.com> <1cb725390904131752u5842c039wb3d75602c479fa45@mail.gmail.com> <Pine.LNX.4.62.0904140053050.10339@hixie.dreamhostps.com> <49E3E229.2060907@webtide.com> <Pine.LNX.4.62.0904140110040.10339@hixie.dreamhostps.com> <49E3F218.4080209@webtide.com>
Content-Language: en-GB-hixie
Content-Style-Type: text/css
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
Cc: hybi@ietf.org
Subject: Re: [hybi] Is there a traffic jam?
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: Tue, 14 Apr 2009 02:54:15 -0000

On Tue, 14 Apr 2009, Greg Wilkins wrote:
> 
> But we can already tunnel arbitrary protocols over HTTP, so if the 
> ability to transport arbitrary protocols is sufficient, then we are 
> already there and nothing new is needed.

Personally I think that having a single underlying TCP connection and the 
ability to do this across domains are pretty important new aspects.


> To be frank, I'd actually rather use HTTP has a basis than websocket.

As I've said before, I have nothing against people using HTTP, either 
straight up as is done today, or in some other protocol like rHTTP.


> The pain points I'm having deploying bidirectional webapplications are 
> mostly about sharing connections:
> 
>  1) How to stop a browser sharing a connection by queuing
>     normal requests behind long polled requests.

WebSocket addresses this by not sharing TCP connections with regular HTTP 
traffic.


>  2) How to share limited connections between
>     widgets/frames/tabs/windows.

WebSocket and SharedWorkers can be used together to get the number of 
long-lived connections per origin (domain) down to one.


>  3) How to limit the growth of connections on the server.

I don't know how to reduce it to less than one TCP connection per origin 
per user. I'm certainly interested in proposals that achieve this without 
sacrificing the other requirements.


> Websocket potentially helps with #1, but only if upgraded connections 
> are excluded from connection accounting (obvious to do, but not sure if 
> that is specified anywhere?).

Since WebSocket isn't HTTP, the HTTP limit doesn't apply, as far as I can 
tell. However, I'm happy to edit the spec to make this clearer, or to 
introduce a limit if one should be imposed.


> Websocket doesn't help with #2 and #3 at all.  In fact it probably makes 
> it worse.  While individual connections are bidirectional, each widgets 
> will be able to each initiate their own websocket connection to their 
> own backend handling.  So the end result is likely to be a lot more 
> unshared connection.

I don't see any reason why this should be the case. Why would it be 
possible to use one pair of connections with HTTP today, but not use a 
single WebSocket connection in the future? Especially considering new 
mechanisms like SharedWorker, which allow resources from one origin to be 
shared across multiple tabs in a browser.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'