Subject: Re: [quicwg/base-drafts] HTTP header compression: static table fit for QUIC (#904)

From: Mike Bishop <[email-masked]>
Date: Mon, 20 Aug 2018 14:35:35 -0700

I've taken a pass over this, pruning out some unsupported/non-standard values and adding in some newer standards that are likely to see HTTP/QUIC use (DoH, Early-Data).  I'm not totally sold on making it primarily client-based, so it's still at 100+ entries.

Along the way, I sorted the headers in three tranches:
- 0-14 for 1-byte Name References:  This is the hand-selected list from earlier that we expect to be common name references and get one-byte encoding in that instruction.
- 15-62 for 1-byte Indexing:  These are the remaining frequently-occurring headers, based either on data or our stated priorities.  It includes the standard methods, the most common success status codes, and other common headers.
- 63-108 for 2+ bytes:  Headers common enough to get through the filter, but not meeting the criteria for the previous tranches.  Includes other status codes, CORS headers, etc.  I also dropped extremely short header names with empty values from this region, because they'll only save 1-2 octets per connection before being placed in the dynamic table.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414471170

---

From: Lucas Pardue <[email-masked]>
Date: Tue, 21 Aug 2018 06:35:49 -0700

Since it's been a while I lost sight of the PR that Mike describes in above comment: it is https://github.com/quicwg/base-drafts/pull/1355.

I've also edited the older Wiki page to point towards this issue and that PR.

I'm not convinced that "alt-svc: clear" warrants inclusion but can live with it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414675899

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Aug 2018 17:38:54 +0000 (UTC)

"clear" is a surprising 4% of Alt-Svc records from the data.  No other single value of Alt-Svc occurs frequently enough to warrant including a value at all, so otherwise it would be blank based on the data.  We could include something like "Alt-Svc: hq=:443,quic=1,ma=?????" for servers on port 443 to refresh their Alt-Svc delegation, perhaps, but we'd have to pick a max-age value.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414759273

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Aug 2018 10:40:40 -0700

Also, it's short enough and likely to be added to the dynamic table, so a name-only entry might be of limited value.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414759883

---

From: Dmitri Tikhonov <[email-masked]>
Date: Tue, 21 Aug 2018 17:43:41 +0000 (UTC)

Assuming it will be `quic=1` and not `quic=2`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414760934

---

From: Lucas Pardue <[email-masked]>
Date: Tue, 21 Aug 2018 18:24:43 +0000 (UTC)

Wow that's more frequent than I imagined.

Another question to ask is how useful is it to insert "clear" into a
dynamic table, given that some UAs will take that as a signal to leave?

A further question, what is the size comparison of a QPACK static table
reference compared an HTTP/QUIC ALTSVC frame?

On Tue, 21 Aug 2018, 18:43 Dmitri Tikhonov, <[email-masked]>
wrote:

> Assuming it will be quic=1 and not quic=2
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/quicwg/base-drafts/issues/904#issuecomment-414760934>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGRFtWxB_XB2oFSiPOYvAvEWaSflrJw-ks5uTEbMgaJpZM4QLNrF>
> .
>

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414774389

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Aug 2018 11:33:04 -0700

Ignoring overheads that will be the same for both, we're looking at what's inside the payload of the STREAM frame.

Assuming I'm counting correctly:
- For a reference to the long end of the static table inside a HEADERS frame you were sending anyway, two bytes.
- An ALTSVC frame as defined by draft-bishop-httpbis-altsvc-quic-00, nine bytes.

And you're correct, at least some UAs would take that as a signal to close the connection or stop using it, since the Alt-Svc entry was specifically removed.  (Most wouldn't close the connection if it just expires, but might hypothetically handle an explicit purge differently.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414777114

---

From: Lucas Pardue <[email-masked]>
Date: Tue, 21 Aug 2018 18:40:59 +0000 (UTC)

Thanks! I think you changed my mind on including it.

Other values of Alt-Svc seem to be a good fit for dynamic table because
they can be lazily set and forget on every response. Indexed name and
dynamic value seems like a fair trade off.

On Tue, 21 Aug 2018, 19:33 Mike Bishop, <[email-masked]> wrote:

>    - For a reference to the long end of the static table inside a HEADERS
>    frame you were sending anyway, two bytes.
> And you're correct, at least some UAs would take that as a signal to close
> the connection or stop using it, since the Alt-Svc entry was specifically
> removed. (Most wouldn't close the connection if it just expires, but might
> hypothetically handle an explicit purge differently.)
>
> —
> <https://github.com/quicwg/base-drafts/issues/904#issuecomment-414777114>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AGRFtcKegi1FbidCup4AgEXb5HqUeb1_ks5uTFJfgaJpZM4QLNrF>
> .
>

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414779548

---

From: Mike Bishop <[email-masked]>
Date: Tue, 21 Aug 2018 18:46:49 +0000 (UTC)

More generally, that suggests a good measure of utility for items in the table.  Having the "clear" value present saves four octets in the rare occasion it's used.  Having the name present saves five octets when alt-svc is inserted or sent as a literal, which probably happens ~once per connection.  You're actually convincing me the opposite direction, as neither seems terribly compelling.

It's tempting to measure each entry on that basis and agree on a cut-off.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/904#issuecomment-414781473