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

Amos Jeffries <squid3@treenet.co.nz> Tue, 02 February 2016 20:31 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 6618F1B30C2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 2 Feb 2016 12:31:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.903
X-Spam-Level:
X-Spam-Status: No, score=-6.903 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 Znl_F-urqaNb for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 2 Feb 2016 12:31:40 -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 D4D3B1B30C1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 2 Feb 2016 12:31:40 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1aQhXl-00069d-4u for ietf-http-wg-dist@listhub.w3.org; Tue, 02 Feb 2016 20:27:21 +0000
Resent-Date: Tue, 02 Feb 2016 20:27:21 +0000
Resent-Message-Id: <E1aQhXl-00069d-4u@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 <squid3@treenet.co.nz>) id 1aQhXf-00068b-HT for ietf-http-wg@listhub.w3.org; Tue, 02 Feb 2016 20:27:15 +0000
Received: from [121.99.228.82] (helo=treenet.co.nz) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <squid3@treenet.co.nz>) id 1aQhXd-0003P5-AF for ietf-http-wg@w3.org; Tue, 02 Feb 2016 20:27:15 +0000
Received: from [192.168.20.251] (unknown [121.98.45.158]) by treenet.co.nz (Postfix) with ESMTP id CB9CEE6F2E for <ietf-http-wg@w3.org>; Wed, 3 Feb 2016 09:26:35 +1300 (NZDT)
To: ietf-http-wg@w3.org
References: <CANatvzxcKS46iAqAdfBHuWPt5k3XkR79NDMPPtDakOb2jPAywA@mail.gmail.com> <56A26B1E.4050303@rd.bbc.co.uk> <CANatvzyHbyrK7cjh+JsRpTR42knc6LXX7GWzj8ZEYPgv8cs49g@mail.gmail.com> <56B0F0DC.3060807@rd.bbc.co.uk>
From: Amos Jeffries <squid3@treenet.co.nz>
X-Enigmail-Draft-Status: N1110
Message-ID: <56B110EE.5050705@treenet.co.nz>
Date: Wed, 03 Feb 2016 09:26:22 +1300
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <56B0F0DC.3060807@rd.bbc.co.uk>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=121.99.228.82; envelope-from=squid3@treenet.co.nz; helo=treenet.co.nz
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=-1.092, BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1aQhXd-0003P5-AF d4b06b2a9c6433eed7350c0e67f7638a
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/56B110EE.5050705@treenet.co.nz>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31035
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>

On 3/02/2016 7:09 a.m., Richard Bradbury wrote:
> On 27/01/2016 04:38, Kazuho Oku wrote:
>> 2016-01-23 2:47 GMT+09:00 Richard Bradbury:
>>> ... This would allow a server to push a more
>>> up-to-date version of a representation in the case where that
>>> representation
>>> has been updated before the originally stated expiry. This allows a
>>> server
>>> to supply the freshest possible version, overriding the client's (in
>>> this
>>> case mistaken) belief that its cached copy is still fresh.
>>>
>>> You suggest below that a client would ignore such a push because it
>>> still
>>> believes its copy to be fresh, thereby defeating the server's attempt to
>>> push a fresher version.
>> Actually I had thought the same.
>>
>> However, my current understanding is that Firefox behaves like that
>> (i.e. ignore the pushed resources if a fresh entry already existed in
>> cache), and from what I heard such behavior conforms to the HTTP/2
>> specification.
> 
> I just re-read [RFC 7540 Section 8.2] and couldn't find any text
> explaining how a client should deal with pushed responses that are
> fresher than a cached item that is still believed to be fresh. The main
> requirement is that the promised request is cacheable, as defined by
> [RFC 7321 Section 4.2.3], and the specification then goes on to say that
> pushed responses can be cached by the client if it implements a cache.
> And that's about it as far as I can work out.

That is because PUSH by itself cannot do conditional requests. Consider
it to be the equivalent for a non-conditional request that always gets
the 200 status response with full new object and new expiry details.


The C-D information is needed from the client for the server to estimate
whether a conditional would have been used and a 30x status PUSHed.

> 
> The implementation in Firefox you describe sounds like a reasonable,
> simple strategy for dealing with HTTP/2 server push that suits a limited
> set of common web browsing Use Cases. Yes, the implementation conforms
> to the HTTP/2 specification, but only because the specification is
> silent on what to do in the more advanced scenario I have introduced.
> 
> Pragmatically speaking, if a user agent is not willing to accept a
> pushed representation that is fresher than something it (incorrectly)
> believes to be still fresh, then your proposed "if-modified-since"
> conditional request is the next best way of getting fresher items into
> the client's cache. Because it relies on the client taking the
> initiative (to find out what is stale and what is still fresh) it does
> feel suboptimal, which rankles a bit. But, having bounced the idea
> around with you, it could be that a client-initiated mechanism is the
> best that can be achieved short of first clarifying the rules for
> caching pushed responses in the HTTP/2 specification, and then
> persuading browser developers to implement those rules.


Objects can be updated earlier than expected in normal HTTP proceedings.
That does not mean the client belief about freshness is wrong/incorrect.
The original object came with cacheability stating it was fresh for some
time period N. It just means there is a fresher copy that could also be
used for more accurate rendering if (and only if) the client happened to
request an update before that N period ran out.

Advertising, tag clouds, suggested linksets, etc. do this type of lazy
refresh routinely. Content could be a lot more dynamic than any one
client sees without raising bandwidth for the service as a whole.

Amos