Re: Submitted new I-D: Cache Digests for HTTP/2

Kazuho Oku <kazuhooku@gmail.com> Wed, 13 January 2016 01:52 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 (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 23A631B2BA8 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Jan 2016 17:52:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.003
X-Spam-Level:
X-Spam-Status: No, score=-7.003 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 HHFfU8U2Vn3R for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Jan 2016 17:52:44 -0800 (PST)
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 8DC241B2BA5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 12 Jan 2016 17:52:44 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aJAXo-0006Fq-HS for ietf-http-wg-dist@listhub.w3.org; Wed, 13 Jan 2016 01:48:16 +0000
Resent-Date: Wed, 13 Jan 2016 01:48:16 +0000
Resent-Message-Id: <E1aJAXo-0006Fq-HS@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <kazuhooku@gmail.com>) id 1aJAXk-0006Dx-81 for ietf-http-wg@listhub.w3.org; Wed, 13 Jan 2016 01:48:12 +0000
Received: from mail-wm0-f43.google.com ([74.125.82.43]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <kazuhooku@gmail.com>) id 1aJAXe-0006dz-6Z for ietf-http-wg@w3.org; Wed, 13 Jan 2016 01:48:10 +0000
Received: by mail-wm0-f43.google.com with SMTP id f206so275397681wmf.0 for <ietf-http-wg@w3.org>; Tue, 12 Jan 2016 17:47:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3qhrvpUfoJCSRVWprVI6GzUWD9SxIwqHeYOtkDsGPyo=; b=KpeJsj2ZZzZo7RMlf9yuidnPfYna30HxSLnC9UxhD4ojSvRilXQ8W4QN6sIxBY0DiB WvTuczyQmgThKLh053uyysM0GK2rmz5ocgmsRDuKbw9A3Pu5w6wvtj2Wxa8H1g4kLayR yCJT/cSp/ysOsyBKiOr8q8oqjQZe/Cu56x3QAO6zTMPrONg4jB636lseNdg/N43AzsoR i9BC5/m8E38lFc1rvVaHAYbLC82xcBVPn2FuyzruGeedurLm5dJx13l0zUeR69rKE1G9 z4DEWL5PUQQNatymI0riTR4KHnQ/pjWUG3UT/vznODBZxZRzcOXMFYu/0r2aGpOw8TeA lzpw==
MIME-Version: 1.0
X-Received: by 10.28.111.194 with SMTP id c63mr23315529wmi.90.1452649659484; Tue, 12 Jan 2016 17:47:39 -0800 (PST)
Received: by 10.194.235.163 with HTTP; Tue, 12 Jan 2016 17:47:39 -0800 (PST)
In-Reply-To: <BF19D095-8A69-47D0-8B9A-CEEFA8E80627@greenbytes.de>
References: <CAAMqGzYUoCMxBxUEY9wfLOHZp7nrO4d1q5JZo=96pfEbVS1-ew@mail.gmail.com> <CANatvzxcKS46iAqAdfBHuWPt5k3XkR79NDMPPtDakOb2jPAywA@mail.gmail.com> <BF19D095-8A69-47D0-8B9A-CEEFA8E80627@greenbytes.de>
Date: Wed, 13 Jan 2016 10:47:39 +0900
Message-ID: <CANatvzw_RHRkbZtqiQo5pZiKasH=tLe8OMudZkedzwCP1Dn3dw@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
To: Stefan Eissing <stefan.eissing@greenbytes.de>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=74.125.82.43; envelope-from=kazuhooku@gmail.com; helo=mail-wm0-f43.google.com
X-W3C-Hub-Spam-Status: No, score=-5.2
X-W3C-Hub-Spam-Report: AWL=-0.545, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1aJAXe-0006dz-6Z a94d8b986f8801462ad9cef1682fcc20
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Submitted new I-D: Cache Digests for HTTP/2
Archived-At: <http://www.w3.org/mid/CANatvzw_RHRkbZtqiQo5pZiKasH=tLe8OMudZkedzwCP1Dn3dw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30908
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>

2016-01-12 18:46 GMT+09:00 Stefan Eissing <stefan.eissing@greenbytes.de>:
> Kazuho,
>
> thanks for the draft and your work in this. I am currently implementing
> a "push diary" for connections in mod_http2. This updates itself while
> handling the connection, but ideally is initialized by a CACHE_DIGEST
> frame.

My pleasure.  It's great to hear that you are also looking into optimizing push.

>> Am 12.01.2016 um 02:04 schrieb Kazuho Oku <kazuhooku@gmail.com>:
>> [...]
>> There are three options here (the draft adopts option C):
>>
>> a) send CACHE_DIGEST frame right before HEADERS
>> b) send CACHE_DIGEST frame at stream_id=zero, with the value of the
>> authority that should be associated to the digest included within the
>> frame
>> c) send CACHE_DIGEST frame right after HEADERS
>>
>> B is clearly the easiest but would have a small impact on the consumed
>> bandwidth, since the authority needs to be sent separately.
>>
>> In A, the server does not need to delay the processing of the request,
>> but needs to cache the value of the digest.
>>
>> It would be great to discuss which of the three approach will be the
>> best solution in general (or if there could be other approaches).
>
> There seems to be an underlying assumption here that CACHE_DIGEST is
> connected to a specific authority which was not immediately obvious
> to me when reading the draft.
>
> With that in mind, I would prefer the CACHE_DIGEST frame to
> carry the authority scope. That makes it self descriptive and
> it can be sent on stream 0, which solves the before/after problem.
>
> Also, I think the authority in that frame should be allowed to carry
> the value '*' to allow endpoint implementations that keep one set
> for all authorities on a connection.

Thank you for expressing your preference.

Number of additional octets needed for embedding the authority name
will typically far less than INITCWND (in many cases around 15KB);
hopefully we can all agree to accept the overhead.

> Additionally:
>
> 1. Just for clarification: the digest values are calculated on
> the absolute URL, :scheme+'://'+:authority+:path? Because h2o
> currently uses only :path, if I read it right.

Correct.

> 2. Would it make sense to limit N and P, so that (N*P) which is
> used for modulo calculation stays in unsigned 32 bit? Even with
> N==P it would work up to 65K, if I am not mistaken...

That is possible, but I am not sure if we should optimize that much.

The computational cost of restricting N*P to 32bit (as opposed to
64bit proposed by Martin) should be negligible; the dominant factor
for encoding / using the digest will be calculating the SHA256 of the
URLs.

Regarding the cost of space, it is possible to truncate the values
obtained from GCS after decoding them.

> -Stefan
>
>> --
>> Kazuho Oku
>



-- 
Kazuho Oku