Re: QPACK and the Static Table

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<https://github.com/quicwg/base-drafts/pull/1355> 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.

Cheers,
Willy

Received on Thursday, 24 May 2018 04:42:23 UTC