Re: Straw Poll: Restore Header Table and Static Table Indices

Mark Nottingham <mnot@mnot.net> Tue, 07 October 2014 06:30 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 780491A1B37 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 6 Oct 2014 23:30:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.574
X-Spam-Level:
X-Spam-Status: No, score=-5.574 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, J_CHICKENPOX_65=0.6, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.786, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_RHS_DOB=1.514] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d7b6FJKZLQFx for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 6 Oct 2014 23:30:28 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 90A9B1A014A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 6 Oct 2014 23:30:28 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1XbOEs-0006f7-3H for ietf-http-wg-dist@listhub.w3.org; Tue, 07 Oct 2014 06:27:14 +0000
Resent-Date: Tue, 07 Oct 2014 06:27:14 +0000
Resent-Message-Id: <E1XbOEs-0006f7-3H@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1XbOEm-0006LI-7R for ietf-http-wg@listhub.w3.org; Tue, 07 Oct 2014 06:27:08 +0000
Received: from mxout-07.mxes.net ([216.86.168.182]) by lisa.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <mnot@mnot.net>) id 1XbOEF-00061v-UG for ietf-http-wg@w3.org; Tue, 07 Oct 2014 06:26:58 +0000
Received: from [192.168.1.83] (unknown [118.209.119.36]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 8F18222E1F3; Tue, 7 Oct 2014 02:26:11 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <20141007061650.GD4566@1wt.eu>
Date: Tue, 07 Oct 2014 17:26:08 +1100
Content-Transfer-Encoding: quoted-printable
Message-Id: <C2C61B19-E738-4B90-BE0F-A4346C095FA4@mnot.net>
References: <CA+pLO_jkN67HLT7oup+FcYVY+RZ7ckhpY2gGy=TAsr2UUMnVVA@mail.gmail.com> <987FB86A-EF8B-4CD1-A9A7-52A9163E8CB3@mnot.net> <54334615.40907@iij.ad.jp> <CAH_y2NGuRBeN=_NJExeFqt06Uq5MAdYHpAp2xhiFKj0AE1wcJQ@mail.gmail.com> <0BB64E69-463C-4D12-8582-FD1FF84D1B10@mnot.net> <20141007052847.GA11117@1wt.eu> <B47FA4E6-6F91-44A1-8257-AE5086EF4DC1@mnot.net> <20141007054917.GB4566@1wt.eu> <28897143-3030-4500-829A-4199CE17CA22@mnot.net> <20141007061650.GD4566@1wt.eu>
To: Willy Tarreau <w@1wt.eu>, HTTP Working Group <ietf-http-wg@w3.org>
X-Mailer: Apple Mail (2.1878.6)
Received-SPF: pass client-ip=216.86.168.182; envelope-from=mnot@mnot.net; helo=mxout-07.mxes.net
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: AWL=-2.860, BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_RHS_DOB=1.514
X-W3C-Scan-Sig: lisa.w3.org 1XbOEF-00061v-UG c8c8cfe9e5c437a6e9f92a4dbe965da9
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Straw Poll: Restore Header Table and Static Table Indices
Archived-At: <http://www.w3.org/mid/C2C61B19-E738-4B90-BE0F-A4346C095FA4@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/27476
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>

Thanks, Willy.

Everyone, please extend the straw poll to include these two options -- who prefers one of them as the solution?

Regards,


On 7 Oct 2014, at 5:16 pm, Willy Tarreau <w@1wt.eu> wrote:

> On Tue, Oct 07, 2014 at 04:54:01PM +1100, Mark Nottingham wrote:
>> Willy, if you have a concrete proposal that you think can can strong
>> consensus, please make it ASAP. Stopping the work to do research on whether a
>> change is necessary isn't appropriate at this point in the work; that train
>> left the station a while ago.
> 
> I have proposed two directions in July and was told it was already too late.
> I'm sorry for not having accurate details anymore in my mind 3 months later,
> but that was the first one :
> 
>       http://article.gmane.org/gmane.ietf.http-wg/23155
> 
> "
> I'm noticing that we need only 4 bits to send any possible static header+value
> (assuming we swap accept-charset and accept-encoding), since all other values
> are empty and will never be used as-is but as litterals.
> 
> So I think that based on your suggestion to split indexing of static and
> dynamic, I'm suspecting we could systematically split indexes between static
> and dynamic in opcodes. Indeed, some index fields are already small (6+ for
> litterals and 4+ for litterals not indexed/never indexed), so having the
> static first will force one extra byte for all dynamic headers. However,
> stealing one bit in unused value ranges could help make that situation
> better. Something along these lines seems possible (please forgive me for
> errors, I'm encoding as I write) :
> 
>  11 XXXXXX => send 6+indexed header from *dynamic* table as-is  (0xC0 reserved)
>  10 01XXXX => send 4+indexed header from *static* table as-is   (0x80 reserved)
> 
>  00 00XXXX => send 4+indexed *dynamic* header without indexing (unchanged)
>  10 00XXXX => send 4+indexed *static* header without indexing
> 
>  10 1XXXXX => send litteral based on *dynamic* header table (0=new name or reserved)
>  01 XXXXXX => send litteral based on *static* header table (0=new name)
> 
> The idea is that even when we have few bits to encode the index, we're not
> forced to add an extra byte to encode the values from the other table, whatever
> table we pick first as first.
> "
> 
> The second one was much simpler and Greg seems to favor it as well :
> 
>       http://article.gmane.org/gmane.ietf.http-wg/23201
> 
> "
> If at least we had the ability to encode both static table and most recent
> dynamic entries with a single index, I would feel better. For example you
> can have another approach :
>  - positive indexes = static table index
>  - negative indexes = - dynamic table index
> 
> You encode (index + 10), so that you can encode up to the last 10 emitted
> fields, and you can encode up to 54 static headers in a single byte (it's
> just a matter of proper sorting but it's already reasonably clean). I think
> you get the idea.
> "
> 
> Greg proposed to run some tests. I really think the second one is *very*
> easy to test in a sane environment, and represents a very small change.
> It ensures that commonly used fields do not need an extra byte, that recently
> indexed headers do not need an extra byte either, and that only old indexed
> headers or rarely used static headers need one. Right now I think that some
> of the static header fields might be less common than a number of the ones
> that are found in the indexed table, precisely because if they're in the
> indexed table, they're being used!
> 
> Regards,
> Willy
> 

--
Mark Nottingham   https://www.mnot.net/