Re: [hybi] Proposed way forward for WebSockets

Jamie Lokier <jamie@shareable.org> Tue, 27 July 2010 16:46 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 BDBF63A6A59 for <hybi@core3.amsl.com>; Tue, 27 Jul 2010 09:46:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.503
X-Spam-Level:
X-Spam-Status: No, score=-2.503 tagged_above=-999 required=5 tests=[AWL=0.096, 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 HKzRORE62c1S for <hybi@core3.amsl.com>; Tue, 27 Jul 2010 09:46:18 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id B24153A69D9 for <hybi@ietf.org>; Tue, 27 Jul 2010 09:46:18 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1OdnIV-0002Hu-9t; Tue, 27 Jul 2010 17:46:31 +0100
Date: Tue, 27 Jul 2010 17:46:31 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Willy Tarreau <w@1wt.eu>
Message-ID: <20100727164631.GI23142@shareable.org>
References: <ECF0E97F-1DA2-4662-BA48-F68B65AA8179@apple.com> <4C4D66AF.9030905@opera.com> <Pine.LNX.4.64.1007270030120.24444@ps20323.dreamhostps.com> <AANLkTi=fx=Yfm_pe9-pdCc=5sKRP=dNfDEBYCKNHFOmH@mail.gmail.com> <op.vghnjpex64w2qv@annevk-t60> <AANLkTik5AB=UPJ47z8tEnVygJodPVAmppeXUymMBz+9n@mail.gmail.com> <20100727065018.GA16134@1wt.eu> <2378.1280217989.251681@puncture> <20100727084521.GC16965@1wt.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20100727084521.GC16965@1wt.eu>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: Server-Initiated HTTP <hybi@ietf.org>
Subject: Re: [hybi] Proposed way forward for WebSockets
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, 27 Jul 2010 16:46:19 -0000

> On Tue, Jul 27, 2010 at 09:06:29AM +0100, Dave Cridland wrote:
> > FWIW, I think current thinking has swerved away from versions - if  
> > you need to actually change version incompatibly, then you may as  
> > well define a new protocol. If you need to incrementally add  
> > features, then proper feature negotiation works fine.

Fwiw, I agree.

> > I'm not against versions, mind, I just think they're generally a last  
> > resort, and a simple "I support these optional features" statement  
> > from one or both sides works much more effectively in most cases.

I agree with that too.  It's good to *have* versions and
identification strings available as a last resort, but it's important
to make sure there's a better way for the other end to detect features.

Willy Tarreau wrote:
> I understand your point but I'm not convinced at all. A version is
> a short way to advertise a feature set. Once you have to send all
> of your requests with "WS-supported-feature: XXX, YYY, ZZZ", then
> you'll find it a lot cheaper to define a new version which sets the
> most commonly used sets by default so that we don't have to enumerate
> them all.

It's not great: The new implementation then doesn't use those features
with older implementations that support the features perfectly well.

> For instance, in HTTP, since version 1.1 we don't advertise
> support for keep-alive nor do we advertise support for transfer-encoding,
> those are covered by default by the version.

HTTP is an example of it not working very well :-)

Most HTTP/1.1 clients still send a HTTP/1.0 keep-alive extension
header, because saying HTTP/1.1 doesn't help the 1.0 servers.

Moreover, most HTTP/1.1 clients don't use transfer-encoding for the
request, even though it's standard, for a variety of reasons.  They
don't use chunked, and compressed transfer-encoding is rare in a
request.

HTTP/1.1 pipelining is avoided in many cases where it might have been
usable - even with servers that confirm they support HTTP/1.1 in an
earlier response.

All that is primarily because HTTP clients have no way to negotiate
with the server, so they have to stick with a common subset that works
with all servers.

In other words, HTTP negotiation either by feature tokens in headers
or by version number, is quite bad for the client-to-server direction.

It is an open question whether "HTTP/1.2" could ever be deployed or if
it would break.

> > There's keepalive frames - ie, I send you data, and you throw it on  
> > the floor - and pings - ie, I send you data, and you send something  
> > back.
> 
> yes you're perfectly right, I tend to merge them but they're distinct.

There's a third type: status-keepalive frames which confirm that state
previously sent is still valid for a given time interval.  That's
application layer, but it benefits from aggregation just like other
keepalive types.

> And also the application will not be aware of the TCP ACK, it's only
> the system. The application only knows it could successfully push the
> data to the system's buffers and that the connection was not yet
> detected as being broken.

Anyway TCP ACK is a false positive if there's a transparent intermediary.
It is not useful.

-- Jamie