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

Kazuho Oku <kazuhooku@gmail.com> Fri, 15 January 2016 06:27 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 0BDC61B29DC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 14 Jan 2016 22:27:19 -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 Gt3C9_mPlrSx for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 14 Jan 2016 22:27:17 -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 5FA2B1B29D5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 14 Jan 2016 22:27:17 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aJxnR-0005A7-B7 for ietf-http-wg-dist@listhub.w3.org; Fri, 15 Jan 2016 06:23:41 +0000
Resent-Date: Fri, 15 Jan 2016 06:23:41 +0000
Resent-Message-Id: <E1aJxnR-0005A7-B7@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 <kazuhooku@gmail.com>) id 1aJxnL-00058z-5b for ietf-http-wg@listhub.w3.org; Fri, 15 Jan 2016 06:23:35 +0000
Received: from mail-wm0-f42.google.com ([74.125.82.42]) by lisa.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <kazuhooku@gmail.com>) id 1aJxnJ-0004b4-5P for ietf-http-wg@w3.org; Fri, 15 Jan 2016 06:23:34 +0000
Received: by mail-wm0-f42.google.com with SMTP id f206so10232290wmf.0 for <ietf-http-wg@w3.org>; Thu, 14 Jan 2016 22:23:12 -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=hRH+Bd9bAbzgGZiO2tpruyPCaX4GNSd1+0vwixyBWV4=; b=x8kD/kxaoYl9xP8W9htb4vG5y+wAKW6TyaR+/sCjAfqJBZ5jWWXx14V8If1j1y1b9b y4icLTvd1PZyyACKfGPqtT2ouAkqxaJobCd8nl4cpzP0llMFp8z8l504V7tTCQVYLzM0 ZcWFKm1s/M3vMwLtGYW9gcPaMQxqLxFA1gsSLevvy6zZTFKfRToqx2dYFCqjFum0gDLi /XHgVzDZOUBGB3epYpR734DS41jAvmEshcJyt6C0cMpSWleF1nLs0hHziIOZxc4cmib8 n1tWOkpEGDxhaaUPrbypZ0atmI8z59b5vo8H6TvuifpkwyQVFzqbQrzDQBRbSOhydISA bibA==
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:date :message-id:subject:from:to:cc:content-type; bh=hRH+Bd9bAbzgGZiO2tpruyPCaX4GNSd1+0vwixyBWV4=; b=VghYdTS/nKfpFVzenoYvjCN2likq9MJPAQLxxxeOmppj/M362PuBp7kKq9oux6b+UU Hj0Z+SolEb/X69ifaqfXn0kM4fz0AvXG0VDVU0RDadGEr+JywBOBUB8Gm1f2SHdoomcU 6bephXW7COrO4aXheIdDLaFR18CghpbjW5ER6cT5uH1ieuNzo3Ps3GmsijKc/LEzLE7W qlzpD0cniICPndE9HXuZkH0r6l5uN1dzxR73DSG6LAcKbwt14HKlr8A3zr4mgnGbX3yj p3yATIFOhEYbBNlFyYAGz1lkMkRZAtsJIw51hj2TemhpoPQp1xKQji62mBCpOfRJLzyL yJpA==
X-Gm-Message-State: ALoCoQnTEPCj07KLEFTWhXd+NlR3Nk6c+fIyy6b7p42IR4AWka9RmDkYpLaQZD2kxNjORoq97XfDZLVYOJfL70EJ0YamCZMOyQ==
MIME-Version: 1.0
X-Received: by 10.194.91.180 with SMTP id cf20mr7925518wjb.121.1452838985980; Thu, 14 Jan 2016 22:23:05 -0800 (PST)
Received: by 10.194.235.163 with HTTP; Thu, 14 Jan 2016 22:23:05 -0800 (PST)
In-Reply-To: <CABkgnnVdR0fi9QKHT=tZUzAzAYe+XxG-oEj=srZGX0TMEkHcuw@mail.gmail.com>
References: <CAAMqGzYUoCMxBxUEY9wfLOHZp7nrO4d1q5JZo=96pfEbVS1-ew@mail.gmail.com> <652C3E3A-3DA6-40BB-82FF-01A7D65FF65C@lukasa.co.uk> <CABCZv0piAoDnA1J+2pJ3HyF_iRwj9AaFGfonFjdKGfYr=cGZgQ@mail.gmail.com> <CAKRe7JG16u+MteBz4Rz7iCnHxfhLZ=QbWekrhgNhNkq+pKhVAg@mail.gmail.com> <CANatvzyT_ohm5hEcJ1o8B+AEa70607E-LUnPp5cD8sSO8X0HKA@mail.gmail.com> <56958980.1030307@treenet.co.nz> <CANatvzyOnMSLHfXcDrGSjbtZi5nFX2e9_4tHOjmR2OqBWEYUcg@mail.gmail.com> <EDB7D8A6-9121-4268-8920-223E9BE16B19@greenbytes.de> <CAKRe7JHh9maCnBgODU_rr5TFVmy3Tdm2bwEp2hHsONW8e_LTjw@mail.gmail.com> <CANatvzw6NpbpA_56GbSiCH2yEQoAuaGtXneOvrogBfucqrC8Qw@mail.gmail.com> <CAKRe7JGUUAinAqM9yHnUp0gJm5qwq5xvMhEo+fMnffRW7Kmu7w@mail.gmail.com> <CANatvzxhCXKRFEVJDeJfdMVxP6r+jyOSCcHkY8VHiPNCSF+SwA@mail.gmail.com> <CABkgnnVdR0fi9QKHT=tZUzAzAYe+XxG-oEj=srZGX0TMEkHcuw@mail.gmail.com>
Date: Fri, 15 Jan 2016 15:23:05 +0900
Message-ID: <CANatvzwPmZXEpcjE+O2BORq19FgGNGYgs7D7t-t_1O0-x-75KA@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Cc: Ilya Grigorik <ilya@igvita.com>, Stefan Eissing <stefan.eissing@greenbytes.de>, Amos Jeffries <squid3@treenet.co.nz>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=74.125.82.42; envelope-from=kazuhooku@gmail.com; helo=mail-wm0-f42.google.com
X-W3C-Hub-Spam-Status: No, score=-5.5
X-W3C-Hub-Spam-Report: AWL=-0.817, 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: lisa.w3.org 1aJxnJ-0004b4-5P b50bfd1cacf445cf12ba8f888b7741d8
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/CANatvzwPmZXEpcjE+O2BORq19FgGNGYgs7D7t-t_1O0-x-75KA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30934
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-15 14:24 GMT+09:00 Martin Thomson <martin.thomson@gmail.com>:
> I think that this would be a little less tortured if you accept that a
> Cache-Digest header field is the primary or only source of truth.

Thank you for the suggestion.  That seems to be true.

Even though including hop-by-hop information as a HTTP header in
HTTP/2 seems strange, it will likely help people using cache digests.

> The frame might then be dropped entirely, apart from one concern, below...
>
>
> On 15 January 2016 at 14:49, Kazuho Oku <kazuhooku@gmail.com> wrote:
>> We might still want to define how a digest value can be unset from the
>> server-maintained digest; one way will be to use a flag to indicate
>> whether if the CACHE_DIGEST frame is a delta to the previous or if is
>> a replace.  Or clients can simply close the H2 connection to clear the
>> server-side digest.
>
> The advantage that a frame provides is that it can be assumed to have
> state shared between requests.  A header field cannot assume the same.
> Therein lies the problem.

Agreed.

Regarding the issue, it is possible to include cache digest in every
HTTP request while maintaining the bandwidth spent for sending the
digests almost on par with when using an HTTP/2 frame, by using the
following approach.

A client should:
1) include entire cache-digest in the first HTTP request sent over an
H2 connection
2) for following HTTP requests, send two (or more) cache-digest
headers, one should contain the value sent in step 1), other(s) should
contain only the values that changed after step 1)

A server should merge the values of the cache-digest headers to
construct the client's cache digest.

In this approach cache-digest header containing all GCS keys (which is
likely to be large) are repeatedly sent, we can expect that it would
be efficiently compressed by HPACK (likely will become 1 byte or 2
byte).

The deltas associated to the following HTTP requests will be small and
can effectively ignored in terms of consumed bandwidth.

One downside of the approach is that the cost of decoding the header
might become an issue on the server-side; but server implementations
can cache the decoded values of the digest.

>> It should also be noted that IIRC SW cannot be defined for an entire
>> domain.
>
> A SW can speak for an entire origin (scheme+host+port), but I wouldn't
> recommend it since it makes other operational aspects of SW more
> challenging.  If you like, an optional parameter could be added to a
> header field to describe the "scope" that the Cache-Digest covers.

Agreed.

-- 
Kazuho Oku

2016-01-15 14:24 GMT+09:00 Martin Thomson <martin.thomson@gmail.com>:
> I think that this would be a little less tortured if you accept that a
> Cache-Digest header field is the primary or only source of truth.
>
> The frame might then be dropped entirely, apart from one concern, below...
>
>
> On 15 January 2016 at 14:49, Kazuho Oku <kazuhooku@gmail.com> wrote:
>> We might still want to define how a digest value can be unset from the
>> server-maintained digest; one way will be to use a flag to indicate
>> whether if the CACHE_DIGEST frame is a delta to the previous or if is
>> a replace.  Or clients can simply close the H2 connection to clear the
>> server-side digest.
>
> The advantage that a frame provides is that it can be assumed to have
> state shared between requests.  A header field cannot assume the same.
> Therein lies the problem.
>
>> It should also be noted that IIRC SW cannot be defined for an entire
>> domain.
>
> A SW can speak for an entire origin (scheme+host+port), but I wouldn't
> recommend it since it makes other operational aspects of SW more
> challenging.  If you like, an optional parameter could be added to a
> header field to describe the "scope" that the Cache-Digest covers.



-- 
Kazuho Oku