Re: QPACK and the Static Table

Willy Tarreau <> Thu, 24 May 2018 04:41 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id AA3561204DA for <>; Wed, 23 May 2018 21:41:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id EfkYX1NlhDRw for <>; Wed, 23 May 2018 21:41:52 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id E6F3A1200A0 for <>; Wed, 23 May 2018 21:41:51 -0700 (PDT)
Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id w4O4fk1d005233; Thu, 24 May 2018 06:41:46 +0200
Date: Thu, 24 May 2018 06:41:46 +0200
From: Willy Tarreau <>
To: Mike Bishop <>
Cc: HTTP Working Group <>, "" <>
Subject: Re: QPACK and the Static Table
Message-ID: <>
References: <>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <>
User-Agent: Mutt/1.6.1 (2016-04-27)
Archived-At: <>
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 24 May 2018 04:41:55 -0000

Hi Mike,

On Wed, May 23, 2018 at 11:16:18PM +0000, Mike Bishop wrote:
> Rather than indexing the tables together and having the static table at 1-61,
> QPACK uses a bit to indicate static vs. dynamic.  Since the field is seven
> bits long, the performance is comparable for the dynamic table (you can
> access 63 entries in one byte, 190 in two), but you can increase the size of
> the static table without hurting the dynamic table.

It will make the code look less "magic"!

> As a result, we're
> building a fresh static
> table<> based on queries
> against HTTPArchive data.
> The key question that has come up in a couple venues:  What real-world
> headers do we want to artificially remove from what the data shows, and what
> headers not seen by HTTP Archive do we want to force in anyway?

I agree with Mark that request really is what matters the most.

>   *   Reordered to put headers you're likely to name-reference at the front,
>   especially if you're unlikely to add them to the dynamic table

Well, some of us have been really bothered by the lack of ordering
in the HPACK headers table, making it painful to perform efficient
lookups. I'd suggest that they are sorted by (name,value) to make
it possible to perform efficient dichotomic lookups.

> The question is whether we should also backfill headers which HTTP Archive
> wouldn't see, delete headers we wish people wouldn't use, and/or insert the
> ones we hope they eventually will.  Some candidates:

That's indeed a good point.

>   *   Add Alt-Svc entry for HTTP/QUIC with QUIC v1
>   *   Add X-Forwarded-For
>   *   Don't add X-Forwarded-For, but do add Forwarded

In practice, we can take both or none. After all, most QUIC requests going
through proxies will be encrypted already thus the proxy will not be able
to add these fields. For clear-text requests, the header field name is
roughly as long as the value, so there's not *that* much to save by encoding
them. And it will not change in most consecutive requests, so the dynamic
compression will be more efficient than the static one. Thus I suggest that
we only add them *if* we have enough unused slots at the end that we care
to cover a very broad set.

>   *   Remove Expires to incent the use of Cache-Control

Expires is for responses only anyway, thus it matters much less. Cache-control
can be used in both directions. I think that the technical focus on request
may make Expires disappear from the table ;-)

>   *   Collapse the "Content-Type: <thingey>" and "Content-Type: <thingey>; charset=utf-8" entries together
>      *   ...but which one to keep?

Probably just focus on the most reported ones and not try to collapse. I
suspect that we see a lot of en-us alone, and utf-8 added to some other
languages, but I could be wrong.

>   *   Add Content-Encoding and/or Accept-Encoding entries for zstd

Probably too early yet, and will not make a big difference overall (almost
only response, 4 characters value).

> There's an endless parade of bikesheds here.  As Martin has pointed out, this
> will never be perfect, so the goal is "good enough and keep going."  Any
> strong feelings about any of these before we merge it?

No real strong feeling here except about the ability to perform fast lookups.

> Also, there's been some discussion of a mechanism for selecting one of
> several static tables at the start of a connection.  In that case, the spec
> would probably define three tables (client headers, server headers [for
> servers that don't push], combined [for servers that push]) and enable future
> RFCs to define others for targeted scenarios (proxies, video playback, IoT,
> etc.).  How much does that interest folks?

I think it could be a good solution. We could also think about APIs and
various datacenter-oriented use cases (eg: webservice etc) where very fast
response and network efficiency matters. It could be a way to encourage
QUIC adoption inside the DC. The risk however is that tables defined too
late are never deployed due to interoperability concerns (unless there's
a way to know that it will be supported before encoding). Thus if some
participants are interested in optimizing for certain use cases, they should
probably provide their own tables to be merged into the standard from day 1.