Re: Clarification of dynamic table size change
Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> Thu, 15 September 2016 14:38 UTC
Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8078C12B557 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 15 Sep 2016 07:38:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.528
X-Spam-Level:
X-Spam-Status: No, score=-8.528 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.508, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 9N2V7xL8R46d for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 15 Sep 2016 07:38:50 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E561712B96C for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 15 Sep 2016 06:52:15 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bkX06-0002mL-Nt for ietf-http-wg-dist@listhub.w3.org; Thu, 15 Sep 2016 13:46:50 +0000
Resent-Date: Thu, 15 Sep 2016 13:46:50 +0000
Resent-Message-Id: <E1bkX06-0002mL-Nt@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <tatsuhiro.t@gmail.com>) id 1bkWzq-0002ie-Tp for ietf-http-wg@listhub.w3.org; Thu, 15 Sep 2016 13:46:34 +0000
Received: from mail-pa0-f46.google.com ([209.85.220.46]) by lisa.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <tatsuhiro.t@gmail.com>) id 1bkWzo-0002tP-Jn for ietf-http-wg@w3.org; Thu, 15 Sep 2016 13:46:34 +0000
Received: by mail-pa0-f46.google.com with SMTP id cm16so16209788pac.0 for <ietf-http-wg@w3.org>; Thu, 15 Sep 2016 06:46:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/WGOma8zP8tMtP5BwmXuv/tYfNgApeVT3sNciSW/uuw=; b=Xx8mX7dkFKV/yuCc1KObusQ8Dsvh6Ao6LuS6M7Z2+/t5RHsMB6vFWVmwrI8bRKSIOO Bm5B2Q5ReNrPbex2SyDuhhx0XDcqQMlryfAPq9zwstGcX+wU9NofxUgeratdGoEXW/nE KeAD2DifJwuqBKia7k0trgNVBEA5CmCaww8thtio1hraTmCADPcaY52SjpbbVr6IYhkY zk/4aF2RaYcA/YaRR/CGxb/tvvQRJMDp70n24C0rahdauw1lf1FrK69uzJbfQ3r0VnPu qpRTDfLZjzGTG/7GixwZ75u+Fdp4IJcwfjcouAxiqtSsIGdvtHTigdIVkqnEKXDVtVEZ qIWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/WGOma8zP8tMtP5BwmXuv/tYfNgApeVT3sNciSW/uuw=; b=LUHSa41RdsqMH8m7b47f4XkGzkceMHX+qWX9HsCcZKs4cxEYTjEMUy8PhGfLursgYd VTSW/7UkyXTuyUIsevjw/p9PKCoDfcMAK0XkCsfclrvigsmx8/QC3qZs4j2vEDEkeHVi A8WgiR9/JRXJGer5Y3cL5Uz9vkbE4jbsQhfVF8qAdA9HwVcPc76uA7uMuR/EJxnuOOeP Jt57p6NRNKFP2R4ZbgZ7EhbFNRLJiiWJQJR/RwWUmkGZq9Epn4M0DXVUL2zohFNmDYFu msuLZUlfUJtBUSDFdSKuCyg/MOah/6syofmPiw3jJGoq38av9dMk+LEjyKYqrs5OZu+M kmFQ==
X-Gm-Message-State: AE9vXwOIT3zdrZzB2h2pSBdilrC1fqJ7Ili/dX5hMbD8HSJNaqW0+Jqz7JsBgwuk8jqbFbDq7d0SevQwGY0BtQ==
X-Received: by 10.66.67.9 with SMTP id j9mr14822344pat.27.1473947165305; Thu, 15 Sep 2016 06:46:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.66.191.166 with HTTP; Thu, 15 Sep 2016 06:45:44 -0700 (PDT)
In-Reply-To: <CACMu3trvyCSD1WCHKFfv192SnXC9WcDQ08+m4VLGLaz0WUp1-Q@mail.gmail.com>
References: <CAPyZ6=+wnoJ4o3g4eS3B2Om3Yqk+wD1_9L6HKWqT8-A4cztnBQ@mail.gmail.com> <EC984486-0010-4B7D-953E-3D1F183C547D@lukasa.co.uk> <CAPyZ6=JVZnn-bwkXpRfPJxMVsTOxLsqhMFLsLZX3s9ojR6C8tA@mail.gmail.com> <3EE9A02C-794A-4147-A108-914AB19F2800@lukasa.co.uk> <56290C49.6040301@crf.canon.fr> <CAPyZ6=LzMHD6=_RUqEjViArGCPU=rPt6di-iZN54C5k0cb+CPg@mail.gmail.com> <20151023161519.GA26338@LK-Perkele-V2.elisa-laajakaista.fi> <CACMu3tqeB7JhL-=OE=ixDNpe2gzbBndSAW+3+LODq7w52xuXrg@mail.gmail.com> <CAPyZ6=Kh3EcB2dW7tk61CPuts+-Mwcd_TW8exn-Gg9vAuEzxBg@mail.gmail.com> <CAOdDvNrTdNzg+RGWQ_c8mVwT2MTb5rngxrFp0GYiMwT2oS3JNA@mail.gmail.com> <CACMu3trvyCSD1WCHKFfv192SnXC9WcDQ08+m4VLGLaz0WUp1-Q@mail.gmail.com>
From: Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Date: Thu, 15 Sep 2016 22:45:44 +0900
Message-ID: <CAPyZ6=JDz=bMarVGTaXJePMvH0F0tc7Wwv3RvX660pug6A1E7w@mail.gmail.com>
To: Bence Béky <bnc@chromium.org>
Cc: Patrick McManus <mcmanus@ducksong.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>, Hervé Ruellan <herve.ruellan@crf.canon.fr>, Cory Benfield <cory@lukasa.co.uk>, Ilari Liusvaara <ilariliusvaara@welho.com>
Content-Type: multipart/alternative; boundary="485b395e7b7f34b17d053c8c11e2"
Received-SPF: pass client-ip=209.85.220.46; envelope-from=tatsuhiro.t@gmail.com; helo=mail-pa0-f46.google.com
X-W3C-Hub-Spam-Status: No, score=-5.5
X-W3C-Hub-Spam-Report: AWL=-0.775, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1bkWzo-0002tP-Jn 1dd6dfe92eae5ba053795985903ee643
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Clarification of dynamic table size change
Archived-At: <http://www.w3.org/mid/CAPyZ6=JDz=bMarVGTaXJePMvH0F0tc7Wwv3RvX660pug6A1E7w@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32401
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>
Hi, On Wed, Sep 14, 2016 at 11:48 PM, Bence Béky <bnc@chromium.org> wrote: > Hi Tatsuhiro and Patrick, > > Thank you very much for the clarification. FYI Starting with release > 54, Chrome will send out a SETTINGS_HEADER_TABLE_SIZE of 64 kB value > in the initial SETTINGS frame, allowing servers to experiment with > encoding using larger tables in hopes of more efficient compression. > > Awesome! Meanwhile, we added new configuration to libnghttp2 to change dynamic table size for encoder per session, so nghttp2 based servers have the opportunity to experiment larger table size with Chromium. Best regards, Tatsuhiro Tsujikawa > Cheers, > > Bence > > On Thu, Aug 18, 2016 at 10:06 AM, Patrick McManus <mcmanus@ducksong.com> > wrote: > > Tatsuhiro's description matches my understanding. > > > > -Patrick > > > > > > On Thu, Aug 18, 2016 at 9:50 AM, Tatsuhiro Tsujikawa < > tatsuhiro.t@gmail.com> > > wrote: > >> > >> Hi, > >> > >> On Thu, Aug 18, 2016 at 10:31 PM, Bence Béky <bnc@chromium.org> wrote: > >>> > >>> Hi all, > >>> > >>> I'm sorry to revive this old thread, but there is one more case that I > >>> would > >>> like to request clarification for. I was looking at both RFC 7540 and > >>> 7541, but > >>> could not find a definitive answer to the following question: What is > >>> the > >>> initial maximum size of the dynamic table if there was a > >>> SETTINGS_HEADER_TABLE_SIZE value in the initial SETTINGS frame (the one > >>> part of > >>> the connection preface)? > >>> > >>> For example, suppose that the decoder sends a SETTINGS_HEADER_TABLE > with > >>> value > >>> 64 * 1024 in the initial SETTINGS frame. Do we think about the HPACK > >>> context to > >>> be created after the connection preface is sent, with a maximum dynamic > >>> table > >>> size of the current SETTINGS_HEADER_TABLE_SIZE value of 64 kB? Or do > we > >>> think > >>> about the HPACK context to be created before the connection preface is > >>> sent, > >>> with a default maximum dynamic table size of 4 kB? Note that there is > no > >>> synchronization issue even in the former case: if the decoder only > evicts > >>> dynamic table entries above 64 kB from the very beginning, there is no > >>> harm in > >>> the encoder not starting to reference entries above 4 kB until it > >>> processes the > >>> decoder's initial SETTINGS frame. > >>> > >>> Suppose that the encoder does not emit a "dynamic table size update" > >>> HPACK > >>> instruction after this. The consensus on this e-mail thread seems to > be > >>> that > >>> this is acceptable as long as the encoder means "no change" to the > >>> maximum > >>> dynamic table size. It is, however, important that the encoder and the > >>> decoder > >>> are in agreement about the initial maximum dynamic table size, relative > >>> to which > >>> the encoder means "no change". For example, if the decoder is under > the > >>> impression that the maximum dynamic table size is 4 kB, while the > encoder > >>> takes > >>> it to be 64 kB, then the decoder will signal a CONNECTION_ERROR as soon > >>> as the > >>> encoder references an entry above 4 kB. If, on the other hand, the > >>> encoder > >>> thinks it's 4 kB and never references entries above that, then the > >>> decoder would > >>> waste memory if it kept 64 kB worth of entries. > >>> > >>> Given that a decoder can send a SETTINGS_HEADER_TABLE_SIZE with a value > >>> lower > >>> than the default, and the encoder can start compressing headers before > >>> receiving > >>> the initial SETTINGS frame, it seems necessary to me to understand the > >>> initial > >>> maximum dynamic table size to be 4 kB, and to require the decoder to > >>> store this > >>> much entries until it receives the dynamic table size update HPACK > >>> instruction > >>> from the encoder. Otherwise a COMPRESSION_ERROR arises due to the > >>> synchronization issue even if the peers agree that the initial size is > >>> the new > >>> (lower) value. Unless, of course, we want to formulate different > >>> requirements > >>> depending on whether the SETTINGS_HEADER_TABLE_SIZE value is greater > than > >>> or > >>> less than the default. > >>> > >>> If I implement a decoder in this spirit, that is, one that sends a > >>> SETTINGS_HEADER_TABLE_SIZE of 64 kB in the initial SETTINGS frame, but > >>> does not > >>> allow more than default memory for the dynamic table until it receives > a > >>> dynamic > >>> table size update from the encoder, would it be incompatible with > >>> anybody's > >>> current implementation? > >>> > >> > >> According to this thread, I'm under impression that this is OK, and > until > >> you get dynamic table size update, default 4KiB dynamic table limit > still > >> applies. > >> > >> As for initial value of dynamic table size, I think it is 4KiB > regardless > >> of SETTINGS. We create HTTP/2 session before doing any parameter > >> modification, including header table size change. At this moment, table > >> size if 4KiB, RFC default. After that, decoder send > >> SETTINGS_HEADER_TABLE_SIZE with whatever value they want. Then after > >> SETTINGS ACK, and HPACK table size update, dynamic table size is finally > >> synchronized, and changed to the value encoder sent in HPACK table size > >> update (as long as it is equal or smaller than decoder sent in > SETTINGS). > >> > >> Best regards, > >> Tatsuhiro Tsujikawa > >> > >> > >> > >>> > >>> Best regards, > >>> > >>> Bence Béky > >>> > >>> > >>> On Fri, Oct 23, 2015 at 12:15 PM, Ilari Liusvaara > >>> <ilariliusvaara@welho.com> wrote: > >>>> > >>>> On Sat, Oct 24, 2015 at 12:45:49AM +0900, Tatsuhiro Tsujikawa wrote: > >>>> > Hi, > >>>> > > >>>> > On Fri, Oct 23, 2015 at 1:18 AM, Hervé Ruellan > >>>> > <herve.ruellan@crf.canon.fr> > >>>> > wrote: > >>>> > > >>>> > > I agree that the wording is ambiguous here. > >>>> > > > >>>> > > However, my reading is the same a Cory's: you don't have to send a > >>>> > > dynamic > >>>> > > table update if the *actual* value is not changed. > >>>> > > > >>>> > > > >>>> > I also found the discussion in this ML indicating you are right. > >>>> > Thank > >>>> > you for clarification. > >>>> > I have to ask one more question: what is *actual* value? Is it the > >>>> > table > >>>> > size both peer agreed before reading SETTINGS, or the value in > >>>> > SETTINGS_HEADER_TABLE_SIZE decoder sent? > >>>> > > >>>> > I think this is a good item to add in FAQ section.. > >>>> > >>>> The way negotiation works: > >>>> - Decoder side sets the upper bound via SETTINGS_HEADER_TABLE_SIZE. > >>>> - Encoder side sets the actual size via dynamic table updates (inside > >>>> HPACK bitstream) within limits set by decoder. > >>>> - If between headers decoder reduces the limit below size signaled by > >>>> encoder, the encoder must first reduce the table size to the minimum > >>>> it was between the frames or less (it can then increase it up to > >>>> current limit). > >>>> > >>>> As example of the last point: > >>>> [4k dynamic table size in use] > >>>> --> HEADERS > >>>> <-- SETTINGS(SETTINGS_HEADER_TABLE_SIZE=4k) > >>>> <-- SETTINGS(SETTINGS_HEADER_TABLE_SIZE=2k) > >>>> <-- SETTINGS(SETTINGS_HEADER_TABLE_SIZE=4k) > >>>> <-- SETTINGS(SETTINGS_HEADER_TABLE_SIZE=8k) > >>>> <-- SETTINGS(SETTINGS_HEADER_TABLE_SIZE=6k) > >>>> --> HEADERS > >>>> > >>>> The second HEADERS must first reduce the dynamic table to at most > >>>> 2k. It can then increase dynamic table size to up to 6k. > >>>> > >>>> > >>>> -Ilari > >>>> > >>> > >> > > >
- Re: Clarification of dynamic table size change Patrick McManus
- Re: Clarification of dynamic table size change Tatsuhiro Tsujikawa
- Re: Clarification of dynamic table size change Bence Béky
- Clarification of dynamic table size change Tatsuhiro Tsujikawa
- Re: Clarification of dynamic table size change Cory Benfield
- Re: Clarification of dynamic table size change Tatsuhiro Tsujikawa
- Re: Clarification of dynamic table size change Cory Benfield
- Re: Clarification of dynamic table size change Hervé Ruellan
- Re: Clarification of dynamic table size change Tatsuhiro Tsujikawa
- Re: Clarification of dynamic table size change Ilari Liusvaara
- Re: Clarification of dynamic table size change Bence Béky
- Re: Clarification of dynamic table size change Tatsuhiro Tsujikawa