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

Kazuho Oku <kazuhooku@gmail.com> Tue, 12 January 2016 01:24 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 154971ACCFD for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 11 Jan 2016 17:24:36 -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 Jn0CG7ENM95x for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 11 Jan 2016 17:24:34 -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 86AF71ACCFC for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 11 Jan 2016 17:24:34 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aIndc-0005lk-IV for ietf-http-wg-dist@listhub.w3.org; Tue, 12 Jan 2016 01:20:44 +0000
Resent-Date: Tue, 12 Jan 2016 01:20:44 +0000
Resent-Message-Id: <E1aIndc-0005lk-IV@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 1aIndY-0005kX-Ds for ietf-http-wg@listhub.w3.org; Tue, 12 Jan 2016 01:20:40 +0000
Received: from mail-wm0-f54.google.com ([74.125.82.54]) by maggie.w3.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from <kazuhooku@gmail.com>) id 1aIndW-0007vh-6p for ietf-http-wg@w3.org; Tue, 12 Jan 2016 01:20:39 +0000
Received: by mail-wm0-f54.google.com with SMTP id l65so233106521wmf.1 for <ietf-http-wg@w3.org>; Mon, 11 Jan 2016 17:20:17 -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:content-transfer-encoding; bh=UScPffQ3v25QUpUfs3KrlZjbYHtGF7mVWhVB7OIzP4k=; b=d1Z/RVRzhMwz6HHPalLG9XHBhdKkSQY+9D6K10mnM4AcyD/kTKs2oE1InurX+aeqrG WNybKHz5ceNPnf2xrphNmVXPo+3ulazQJi7tpchIlirhMdV5hkkMho0ahPZrvXTwrJDa x7DigytmJaP1v+w6m1GnDieAe8YVad1sCCUTZOjgxl7pNs0K/2WsWx/2y5qV5ToHlDmv oOU6ah4PhhTq6Tb0Gen0ZJTjNqsOBGXRvXPcEgdU1SgzrgGJg/91FbWO5faMxodz4+Zh 07rh94Jjwfj3xBVyyS5dx6bqJv8C9x8AwO3YoskYJuUUdqFSs/cRp3yDZ79LaH9PLP4x ldMQ==
MIME-Version: 1.0
X-Received: by 10.28.23.73 with SMTP id 70mr15819419wmx.37.1452561611189; Mon, 11 Jan 2016 17:20:11 -0800 (PST)
Received: by 10.194.235.163 with HTTP; Mon, 11 Jan 2016 17:20:11 -0800 (PST)
In-Reply-To: <CAKRe7JG16u+MteBz4Rz7iCnHxfhLZ=QbWekrhgNhNkq+pKhVAg@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>
Date: Tue, 12 Jan 2016 10:20:11 +0900
Message-ID: <CANatvzyT_ohm5hEcJ1o8B+AEa70607E-LUnPp5cD8sSO8X0HKA@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
To: Ilya Grigorik <ilya@igvita.com>
Cc: Chris Bentzel <chris@bentzel.net>, Cory Benfield <cory@lukasa.co.uk>, Alcides Viamontes E <alcidesv@zunzun.se>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=74.125.82.54; envelope-from=kazuhooku@gmail.com; helo=mail-wm0-f54.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: maggie.w3.org 1aIndW-0007vh-6p d3e2bb35a0eb2951047bbc7a26294942
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/CANatvzyT_ohm5hEcJ1o8B+AEa70607E-LUnPp5cD8sSO8X0HKA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/30894
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 0:39 GMT+09:00 Ilya Grigorik <ilya@igvita.com>:
> Glad to see this proposal!
>
> FWIW, another +1 for enabling this functionality via an HTTP header.
> Limiting it to h2 frames makes it effectively inaccessible to web developers
> that want to experiment with own cache management logic (via ServiceWorker,
> etc).

Glad to hear from you.

While it is possible to use an HTTP header to implement cache-digest
(and that is what we are doing now in H2O + ServiceWorker/cookie), I
believe it should ideally be implemented as an HTTP/2 header since:

* including the digest value (the value changes as client receives
responses) in every HTTP request is a waste of bandwidth
* cache state is an information that is bound to the connection, not
to a request

There are hacks that be used to evade such problems:

* use multiple headers (send a big constant + small delta that changes
frequently) to represent a single digest for HPACK efficiency
* do not send cache digest if it is likely than an intermediary exists

but I do not think we should include such things in the spec.

> ig
>
> On Mon, Jan 11, 2016 at 2:42 AM, Chris Bentzel <chris@bentzel.net> wrote:
>>
>> The draft does cover some privacy concerns (such as clearing the digest
>> when cookies are cleared).
>>
>> One concern not covered is how to deal with cases where a client may have
>> cached content from an origin with a mix of cookies. For example, if a user
>> has enabled third-party cookie blocking in a browser and has visited an
>> origin in both a first-party and third-party context there may be a mix of
>> cached content with a session identifier cookie and no cookie.
>>
>> If the user re-visits that origin in a first-party context, the digest may
>> reveal content retrieved in a third-party context.
>>
>> One option is to treat cached content as if there is an implicit Vary:
>> Cookie header and only include in the digest if it matches. The draft
>> already requires only including fresh cached entries in the digest so a
>> selection process for cached entries already will need to exist.
>>
>> On Mon, Jan 11, 2016 at 3:16 AM, Cory Benfield <cory@lukasa.co.uk> wrote:
>>>
>>>
>>> > On 10 Jan 2016, at 17:11, Alcides Viamontes E <alcidesv@zunzun.se>
>>> > wrote:
>>> >
>>> > Can we embed the cache digest in a header?
>>> > ——————————————————————————————
>>> >
>>>
>>> On a personal level I am extremely nervous about shoving 24kB of data
>>> into a header value. The practice of doing this for Kerberos tokens already
>>> caused us to require the CONTINUATION frame unpleasantness in RFC 7540.
>>> Generally speaking it seems like smuggling long strings in HTTP headers is a
>>> bit of an anti-pattern, and given that HTTP/2 gives us much nicer methods of
>>> transporting this kind of data it seems a shame not to use them.
>>>
>>> Cory
>>>
>>
>



-- 
Kazuho Oku