Re: Rechartering HTTPbis

Willy Tarreau <w@1wt.eu> Thu, 26 January 2012 09:37 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1925A21F84FB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 26 Jan 2012 01:37:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.156
X-Spam-Level:
X-Spam-Status: No, score=-9.156 tagged_above=-999 required=5 tests=[AWL=1.443, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G0hUy22F5M34 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 26 Jan 2012 01:37:20 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 6C1E421F84D1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 26 Jan 2012 01:37:20 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.69) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1RqLlO-00075y-VF for ietf-http-wg-dist@listhub.w3.org; Thu, 26 Jan 2012 09:37:03 +0000
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.69) (envelope-from <w@1wt.eu>) id 1RqLlC-000755-4X for ietf-http-wg@listhub.w3.org; Thu, 26 Jan 2012 09:36:50 +0000
Received: from 1wt.eu ([62.212.114.60]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1RqLkw-0005CQ-LN for ietf-http-wg@w3.org; Thu, 26 Jan 2012 09:36:40 +0000
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id q0Q9ZvxJ009025; Thu, 26 Jan 2012 10:35:57 +0100
Date: Thu, 26 Jan 2012 10:35:57 +0100
From: Willy Tarreau <w@1wt.eu>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: Amos Jeffries <squid3@treenet.co.nz>, ietf-http-wg@w3.org
Message-ID: <20120126093557.GA8887@1wt.eu>
References: <3242f7d9fe2f4046819ab4fcbafab251@treenet.co.nz> <3978.1327567140@critter.freebsd.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <3978.1327567140@critter.freebsd.dk>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-1.9
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01
X-W3C-Scan-Sig: lisa.w3.org 1RqLkw-0005CQ-LN d6b02962608b6a821e4d3cf4a90d1e18
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Rechartering HTTPbis
Archived-At: <http://www.w3.org/mid/20120126093557.GA8887@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/12133
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>
Resent-Message-Id: <E1RqLlO-00075y-VF@frink.w3.org>
Resent-Date: Thu, 26 Jan 2012 09:37:02 +0000

On Thu, Jan 26, 2012 at 08:39:00AM +0000, Poul-Henning Kamp wrote:
> In message <3242f7d9fe2f4046819ab4fcbafab251@treenet.co.nz>, Amos Jeffries writ
> es:
> 
> >So how would compression type be embeded in the request-line in a way 
> >not to break HTTP/1.1 servers receiving it?
> 
> First of all, I would not allow different compression types.  It's ZLIB
> and it's mandatory.

I find it pretty cumbersome to force everyone to support zlib, especially
in environments where it provides no benefit (small requests/responses)
and only adds CPU usage and latency. It's especially true on intermediary
components which would have to decompress everything to be able to perform
trivial actions such as decide what server to forward to. Using either pure
binary header names or short forms would already be quite efficient.

> Second, we cannot know if the other end is HTTP/1.1 or HTTP/2.0 until
> we see its reply, so the first request would always be in HTTP/1.1 format.

That's the exact principle of the current Upgrade mechanism.

> One way to indicate the shift to compressed HTTP/2.0 would be that
> the first character of the second request is 'Z', and the entire
> connection is compressed from then on.

Better rely on Upgrade. It's well documented and is already used by Websocket.
A number of other alternatives had to be ditched out because they were not
reliable enough through intermediaries.

> @ Amos Jeffries:
> 
> (about trailer updates to information)
> 
> >Provided that the trailer details are limited to transport meta data 
> >like your example case.
> 
> Yes, absolutely.  The content metadata should be transparent from one
> end to the other through all intermediaries.
> 
> @Adrien de Croy <adrien@qbik.com>
> 
> 
> >Actually this raises the issue of aborting transfers.
> >
> >Currently to abort a chunked transfer, you must close the connection.  
> >(and this triggers all sorts of nasty buggy behaviour in browsers - most 
> >of which don't complain).
> >
> >It would be nice if the chunk header could signal an abort.
> 
> That is one of the primary reasons why I want trailers mandatory:  To
> be able to kill a transfer that went awry half way through without
> abandonning the connection.

Making trailers mandatory will cause a lot of pain to static servers
relying on sendfile() and equivalent mechanisms. Really, I think that
current chunking already offers provisions for reporting issues, and
that trying to improve the minority of unrecoverable error situations
will cost a lot for many components in the normal case.

> @Willy Tarreau:
> 
> >It's already possible, we can add attributes on chunk sizes. We could
> >already have something like this to abort the transfer :
> >
> >     0;reason=abort\r\n
> 
> First: YUCK!
> 
> Second: That ditches the entire object.  In many cases a 206 would be
> perfectly fine.
> 
> Third: That reminds me of another thing:  Make the chunk header a fixed
> size to improve efficiency.

There's no one-size-fits-all. Having small chunks (eg: 256 bytes) will
cause a huge overhead for very small exchanges (eg: auto-completion),
while at the same time significantly reduce on-wire efficiency and CPU
efficiency. Chunking works remarkably well for all sizes nowadays, let's
not reinvent something which works well.

Willy