Re: New Version Notification for draft-vkrasnov-h2-compression-dictionaries-01.txt

Vlad Krasnov <> Wed, 02 November 2016 18:15 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6849A1294BB for <>; Wed, 2 Nov 2016 11:15:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -7.998
X-Spam-Status: No, score=-7.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Pjfi2gbcAgFp for <>; Wed, 2 Nov 2016 11:15:22 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 26DE8129784 for <>; Wed, 2 Nov 2016 11:15:18 -0700 (PDT)
Received: from lists by with local (Exim 4.80) (envelope-from <>) id 1c2000-0000H6-N0 for; Wed, 02 Nov 2016 18:10:56 +0000
Resent-Date: Wed, 02 Nov 2016 18:10:56 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1c1zzt-0000Fw-Bc for; Wed, 02 Nov 2016 18:10:49 +0000
Received: from ([]) by with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <>) id 1c1zzn-0002yf-K2 for; Wed, 02 Nov 2016 18:10:44 +0000
Received: by with SMTP id i88so15800155pfk.2 for <>; Wed, 02 Nov 2016 11:10:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8i6CfiKwdB0wfC0tBapu2xCmquusnsVGrh/dJoph5b4=; b=bMHWrRLoorsM3tXwlcAuTMJwmKFvvjFY8KHHy9LSyAl0FL7JpUnZQA16w3g9EhOY9V zKjEMSolR6iGTuXKZHLW2wjHj2g55PSj+VjEwDObVZ03Q7QzTcWmXa4y3XxdboXkeegy ue9EBFetGtCd5Qk566uHKre+QaKx+QIuq76cg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8i6CfiKwdB0wfC0tBapu2xCmquusnsVGrh/dJoph5b4=; b=UFL1T+kuIQYAGtp9X+IlUk5MKP+c9hcHyo9Tk8eCJQx5eBVOZzYFLsWGB+J2jNDbBF +h7IcMfV3khI0WjiWCcF5K9BONsBXA8ZeIkoyAe0XqBlLyKg9paFmziTfi2u6au7P5pg KZVSp4FAvvCx7F2t1+MV3MJ37ZC9tgBja67qHido4th3nZpctNaXpZzYTOyy1N4nP9Tf V0zxVEjDBpAjR71Xm+Q1JOGI8B1N+ELW8jLIkWgsbQhJEkiX0A/tx+nniXQaMLgFqA+F WCihIft/+db6RSg7Z9BAFbHenAiflF3KtEeUnKQ+gXD8+MUF3nt7emGkKg7lO9p4ZhQB mdzg==
X-Gm-Message-State: ABUngvfQqWoAVr0KGFar3rSxM5PGSoyl2hWsafvDF7ZQfqWNcsMhVYQfCMu4rrQ7Wc7XKO+j
X-Received: by with SMTP id y76mr9229838pfd.158.1478110217050; Wed, 02 Nov 2016 11:10:17 -0700 (PDT)
Received: from ?IPv6:2601:645:8302:ef30:2cf6:a89:106c:18c1? ([2601:645:8302:ef30:2cf6:a89:106c:18c1]) by with ESMTPSA id cp2sm6409287pad.3.2016. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Nov 2016 11:10:16 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\))
From: Vlad Krasnov <>
In-Reply-To: <>
Date: Wed, 2 Nov 2016 11:10:15 -0700
Cc: HTTP Working Group <>
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <>
To: Martin Thomson <>
X-Mailer: Apple Mail (2.3251)
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: 1c1zzn-0002yf-K2 b16c6e05db34c932b3221367e1c48722
Subject: Re: New Version Notification for draft-vkrasnov-h2-compression-dictionaries-01.txt
Archived-At: <>
X-Mailing-List: <> archive/latest/32813
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

> The document is really light on details regarding how to use a
> dictionary.  I realize that this might /seem/ obvious, but it really
> needs to explain how better (up front preferably) how it is intended
> to work.  In particular, how do I tell what compression algorithm to
> feed the dictionary into?  HTTP/2 doesn't know about compression, in
> particular, HTTP/2 really *can't* use content-encoding.

Actually I was in the mind of reusing accept-encoding/content-encoding for this.

> I see that you have settings for the number of dictionaries, and the
> size of those dictionaries, this is good, but I think that you need to
> set an overall limit instead of a per-dictionary limit
> SETTINGS_MAX_DICTIONARY_SIZE (you get better efficiency that way).

That sounds like a good idea. 
The benefit of having a per-dictionary limit, is that when you append a stream to an existing dictionary it is implied you only keep the maximal allowed amount of bytes.
After all there is no point of having a dictionary larger than your window.
With a global limit you might want to specify how many bytes to keep explicitly, that creates additional overhead.
Maybe combine both?

> I like the idea of static dictionaries, but your structure would force
> an implementation to support ALL static dictionaries if they wanted to
> support ANY dynamic dictionaries.  That might be inadvisable.  A
> separate setting would be better I think.  (Static dictionaries could
> start from the top of the numbering space, perhaps, so that you can
> have many static dictionaries.)

There a few options I considered for static dictionaries, and all of them are acceptable for me.
Currently I went for the cheapest option in terms of implementation simplicity/overhead.

> The security considerations need a lot more detail about when it is
> safe to use a compression dictionary, etc.

It should be OK compress same origin, self referenced requests, this however degrades performance on sharded websites.
Also the use of static dictionaries is quite safe.