Re: Call for Adoption: Cache Digests for HTTP/2

Alcides Viamontes E <alcidesv@zunzun.se> Mon, 27 June 2016 07:10 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 5F30112B042 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 27 Jun 2016 00:10:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.346
X-Spam-Level:
X-Spam-Status: No, score=-8.346 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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.426, 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=zunzun-se.20150623.gappssmtp.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 Dl9Chf4oVYte for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 27 Jun 2016 00:10:03 -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 B4999128874 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 27 Jun 2016 00:10:03 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bHQc6-0007Gv-Pn for ietf-http-wg-dist@listhub.w3.org; Mon, 27 Jun 2016 07:05:46 +0000
Resent-Date: Mon, 27 Jun 2016 07:05:46 +0000
Resent-Message-Id: <E1bHQc6-0007Gv-Pn@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 <alcidesv@zunzun.se>) id 1bHQc0-0007GA-TC for ietf-http-wg@listhub.w3.org; Mon, 27 Jun 2016 07:05:40 +0000
Received: from mail-oi0-f46.google.com ([209.85.218.46]) by maggie.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <alcidesv@zunzun.se>) id 1bHQbr-0008FX-27 for ietf-http-wg@w3.org; Mon, 27 Jun 2016 07:05:36 +0000
Received: by mail-oi0-f46.google.com with SMTP id s66so188773722oif.1 for <ietf-http-wg@w3.org>; Mon, 27 Jun 2016 00:05:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zunzun-se.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iRUUlbZmcCtGFVFUYJ22GNyA5bkA6CKu/wDHVW9xwUg=; b=g6Or24RnKU06WTaj/zd1wLQU/nSFbeuHpfMJE0xNdQ7QLt62ixxVmg0+p8U8yuoVSp obBYDGgq1ci3ligGPcpa+/rbvunjy8H2ySVnt1WCj4fh2+IgBBsImkKOXE/h7+4IFCN6 3f5vP53VHHF7b3/QpsQQuxTkHHJcjx3ob2y3fo9EB8z7e4jPSue+wL3+R+jrH7b93BPp bzMQEfw03MANI82hNiLxw398kn4oX+QTCM9UPQespJroetTo7Typw+opI/H7qFvzdCOn Jh2uI8Wn+/TAehGvkKUTqfSuIyTvbAP+zMjiBWy8mqSX3iaB3hqBMYl6DsfvbGmJGcEQ ntuA==
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=iRUUlbZmcCtGFVFUYJ22GNyA5bkA6CKu/wDHVW9xwUg=; b=Qtl/ihO5GY3gyGV97H7TPkEIF2OMyTIaPxmtogb7YylTCLrcbN9g75XJDfQGmzFQDK q8XViZqoDX/fqG3/eFZnQFdGZgeVCOTqnUj6gLy3VOOTyzoWsFJN6NVXN8upQ4Mmp5I4 NFgQrtO2/hTKUp10GDp4TEOVJ7TOWYpxEjqgz/WsXTQ74w/bo6hUtnW+bJgoxfqR6Riv x9+TtnpVQRqBNX6i5yt3/f3WRi+42Wuj6aKMrE/foZhe5wae9keK2kbkLfHZPcSK+Ln2 HjPErx/dpuMhBQVVpaXcXC19xX4CZpsO08gGgelD+k/lkcRY6/cLhAGLZTA4vYYRBb3i MqHw==
X-Gm-Message-State: ALyK8tJjr/yntgrkvPYixCbZjDipQgfp13g3oK5pCfXB0OUQ2BW4cSPkzgNBpCXatZnO9mMnoS7YxAAv5WsKfA==
X-Received: by 10.157.42.5 with SMTP id t5mr10517691ota.94.1467011103940; Mon, 27 Jun 2016 00:05:03 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.202.175.214 with HTTP; Mon, 27 Jun 2016 00:05:02 -0700 (PDT)
In-Reply-To: <CANatvzxsXAueKCACBpYts4X9Dd_Q-cm71L1g4p2Ze=r4M9Q_YA@mail.gmail.com>
References: <040BA5C3-6CA3-4183-9B33-20D8F7A5CA16@mnot.net> <CAAMqGzbnd9=YJ39sU8K7it-q_Tigw9F7rLOSewMGYL7d1FYFaQ@mail.gmail.com> <F3B609B2-E5B8-4E56-910B-BEB3402329EA@lukasa.co.uk> <CAAMqGzbXk2WHShyrMqG5UNPZVqp7xb1UJLJtjFagC2SihLr=Hw@mail.gmail.com> <CANatvzwHng-jBPMfPMxeDtA9XzG0SNK-_2_LgGj7xR9ApQJQ9Q@mail.gmail.com> <CAAMqGzZ=dZE8-X-CKvgWbPs3km3bCTQeMCU793SsT-oyi2qN6w@mail.gmail.com> <CAAMqGzY8tRVS418suitvHtJaDKiBZbpvCi0KBQGt91YZTApynA@mail.gmail.com> <CANatvzxsXAueKCACBpYts4X9Dd_Q-cm71L1g4p2Ze=r4M9Q_YA@mail.gmail.com>
From: Alcides Viamontes E <alcidesv@zunzun.se>
Date: Mon, 27 Jun 2016 09:05:02 +0200
Message-ID: <CAAMqGzbtMGXi6gma8wK7nWcDBGQk5nOK+FYxFaPZ23vvfiaJog@mail.gmail.com>
To: Kazuho Oku <kazuhooku@gmail.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a11404e7ebb780905363d2327"
Received-SPF: pass client-ip=209.85.218.46; envelope-from=alcidesv@zunzun.se; helo=mail-oi0-f46.google.com
X-W3C-Hub-Spam-Status: No, score=-5.4
X-W3C-Hub-Spam-Report: AWL=-0.818, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=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 1bHQbr-0008FX-27 1934812fca1d5acafdbad517e1b44d83
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Call for Adoption: Cache Digests for HTTP/2
Archived-At: <http://www.w3.org/mid/CAAMqGzbtMGXi6gma8wK7nWcDBGQk5nOK+FYxFaPZ23vvfiaJog@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31796
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>

>
>
>
> Considering the fact that H2 push is optional (and Cache Digests for
> HTTP/2 is an option to H2 push), I am afraid it might not become the
> standard way to update a fresh response.
>
> If we are to solve cache busting, it might be better to consider
> adding a validator to the link-rel-preload header. For example, we
> could add a etag attribute, that presents the etag value that is
> _expected_ to be used together with the response that contained the
> link header. Upon observing such header, clients can check their
> cache, and in case the validators do not match, remove the response
> from cache and issue a new request.
>
> In other words,
>
>   link: </style.css>; rel=preload; etag=deadbeef
>
> would instruct the web browser to fetch /style.css if it is not
> fresh-cached, or if the etag value of the cached response does not
> match the value supplied by the header.
>

This is a good mechanism! It may require a bit of common sense to avoid
race conditions between PUSH_PROMISEs and STREAM_RESETs but that's not too
much to ask. And as you said, it can even be used with HTTP/1.1

I have opened a ticket in the preload draft and added your text above:
https://github.com/w3c/preload/issues/68 ...


> The pros of this approach would be that it could be used over both
> HTTP/1 and HTTP/2, and that it does not require the browser to
> implement H2 push. The cons would be that it would only be possible to
> invalidate responses as part of the preload process.
>
> >>
> >>
> >> >>
> >> >>
> >> >> However, it may be sensible to consider providing a SETTINGS field
> that
> >> >> allows servers to flag a maximum size on a cache digest that it is
> >> >> willing
> >> >> to accept.
> >> >
> >> >
> >> > But this leaves the server without any control about which things are
> >> > made
> >> > part of the cache digest. That's why we think scoping and an explicit
> >> > eviction mechanism are better long term solutions.
> >>
> >> We could extend the current draft if scoping would be an issue, and it
> >> would be possible to do so with keeping backward compatibility. For
> >> example, we could add a new flag that indicates that the scope of the
> >> digest is limited to certain mime-type and that the mime-type is
> >> stored in the frame in addition to the digest-value.
> >>
> >> That said, does your concern about the size of the digest dissolve
> >> without adding a method for a server to notify the client the maximum
> >> permitted size of the digest (e.g. a SETTINGS field as suggested by
> >> Cory)?
> >
> >
> > After some reflection, I must agree that limiting the size of the digest
> is
> > probably a good compromise until we know if scopes are really needed.
> This
> > setting could even be used to make the digests opt-in, which is a plus.
>
> Thank you for the clarification.
>
> > ./Alcides.
> >
>
>
>
> --
> Kazuho Oku
>