Re: Scope of Server Push

Alcides Viamontes E <alcidesv@shimmercat.com> Wed, 24 August 2016 11:36 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 E5A7512D931 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Aug 2016 04:36:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.468
X-Spam-Level:
X-Spam-Status: No, score=-7.468 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=-0.548, 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=shimmercat-com.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 YFxPO4n-hhcM for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 24 Aug 2016 04:36:35 -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 AA01C12D100 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 24 Aug 2016 04:36:35 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bcWPE-0005Qa-AD for ietf-http-wg-dist@listhub.w3.org; Wed, 24 Aug 2016 11:31:40 +0000
Resent-Date: Wed, 24 Aug 2016 11:31:40 +0000
Resent-Message-Id: <E1bcWPE-0005Qa-AD@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 <alcidesv@zunzun.se>) id 1bcWP4-0005Pp-AC for ietf-http-wg@listhub.w3.org; Wed, 24 Aug 2016 11:31:30 +0000
Received: from mail-ua0-f178.google.com ([209.85.217.178]) by lisa.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <alcidesv@zunzun.se>) id 1bcWP2-0005Ut-22 for ietf-http-wg@w3.org; Wed, 24 Aug 2016 11:31:29 +0000
Received: by mail-ua0-f178.google.com with SMTP id n59so22572937uan.2 for <ietf-http-wg@w3.org>; Wed, 24 Aug 2016 04:31:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shimmercat-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OxLdaNBTsJS5r6wfcku4cT+RXVaZ3Kn2SHgY8YZoUpk=; b=Zp0fTFNRZCYc0bKuBf+cbFIV4R/YecaMZgvv9QmdKGE7//WzpERm1mYx0aoBE0ktHm YPzdRduvUKrXomK4rMykqqDn1A2g8SBkUOkqK7HAq3uduPnwFHSHoflhNrWAzZzJDeZo sEyR19rCvceKK8bJWFB8hro7lLC7J9Lw+kiv6uEFNZ3b4F7KMUxSRgQBspIZgCLAsLBK S2tLhRUNS74HgNcfFbulP8HuOXtU/f5ljKbtFHvZrEkHU5mkEBGnJC34EN7YC9nNkxF/ fjaS+5zwJ+jJwuU6LJs8Dw4dVLQUxEVT9Bc+mLpRujq96fiDxYlIs95KJunbX5YTZig7 37Zw==
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=OxLdaNBTsJS5r6wfcku4cT+RXVaZ3Kn2SHgY8YZoUpk=; b=QdgRTF0Rkw3hgEjO5l3m9to5an9HRC61xjmLPmBzu6eMmCWCWxKvVRHp6ZTKMx/dRj wCgMSO6OGzii2+zI9InG8KjEOZjKFX0nozKnCPx1ldl1+ZkgR9WDVaaDdlkhyy8VwmLD lrEL3B96yffrjocQMTRIQiRiNjGtsqw9CBwm49uBqu9Jj2rBXP1cqxiddBg3hWtBW1HA hmrM4ITNErGy/kxt8kIwJIp/tl4r8ihaxgCEXXu12ycqPYVL1DgOH7smIMRxbY8C7cIv q/d1GqIHJ6iQhIxmX2hC1hEeCPNrqfkOXmiw+OS4e2vAb8xK6wvPDkvIo3+jcys6wB67 YAsg==
X-Gm-Message-State: AEkoouvHoJokC73uTMKXN1Fvelbxf6hYMvPWGwYToqa9WA79I89leTcWTwAt8xwsdc1BlTnGPb4Hmu4E2/zJtQ==
X-Received: by 10.31.82.4 with SMTP id g4mr1411446vkb.77.1472038261071; Wed, 24 Aug 2016 04:31:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.31.32.9 with HTTP; Wed, 24 Aug 2016 04:31:00 -0700 (PDT)
In-Reply-To: <BE505340-EB4A-4294-AA18-2E365021D983@mnot.net>
References: <BE505340-EB4A-4294-AA18-2E365021D983@mnot.net>
From: Alcides Viamontes E <alcidesv@shimmercat.com>
Date: Wed, 24 Aug 2016 13:31:00 +0200
Message-ID: <CAAMqGzZEZncDdK6nBbYsSaN8iVt9irq=BfrffMSFYN2M8buUbw@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="001a114e3f32a5b930053acf9d04"
Received-SPF: pass client-ip=209.85.217.178; envelope-from=alcidesv@zunzun.se; helo=mail-ua0-f178.google.com
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=-2.067, 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_NW=0.5
X-W3C-Scan-Sig: lisa.w3.org 1bcWP2-0005Ut-22 7675882b59e74f9b9928802d5cfc099f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Scope of Server Push
Archived-At: <http://www.w3.org/mid/CAAMqGzZEZncDdK6nBbYsSaN8iVt9irq=BfrffMSFYN2M8buUbw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32349
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>

Two quick comments.

The first is related to the "rendezvous zone"... how long are things
expected to be kept there?

The second has to do with a use case that I think falls into a gray zone:
using Push as a "good" way of doing HTML inlining.  Just to dust it off,
say that the HTML file goes like this:

...</div><!--point-->

<script src="nugget.js"></script>

</body>

</html>


The server may want to push 'nugget.js' as a way to save a round-trip. At
first instinct one would like to send the push promise either immediately
before the HTTP headers for the HTML stream, or immediately after. But
piling too many push-promises  close to the start of the TCP connection may
trigger a round trip.
An alternative is  to architect the DATA frames for the HTML so that there
is one terminating at "point", insert the push promise for nugget.js there
(if the server knows, e.g. via cache digests, that the client doesn't have
"nugget.js"), and only then continue sending the HTML data frames.

Notice that this is the same use case that has been imagined for Push, and
I have reviewed RFC 7540 to see if this contradicts the spec in some way
and so far I think it doesn't. It is just sending the push promise as late
as possible to avoid congestion round-trips. There is no need to do this
for pages that only require a few scripts to be pushed, but if developers
are going to stop concatenating assets, the number of smallish Javascript
and other files one may need to push to get a quick first render grows very
quickly, we have seen this happen in some of our sites.

Waiting as much as possible to send push promises would also work nicely
with the current cache digest proposal, as the server gets more time to
receive any cache digest frames in flight from the browser.

Sending push promises just before the links embedded in DATA frames  may or
may not work today, since there is no hard requirement for browsers to mix
links scanned from the HTML contents with links arriving in push promises
as strictly and eagerly as possible. It would be nice to account for this
use case in any future precisions to HTTP/2 push.



On Wed, Aug 24, 2016 at 6:55 AM, Mark Nottingham <mnot@mnot.net> wrote:

> Currently, browser implementations of Server Push will not inject the
> pushed response into the HTTP cache until there is a reference to it from
> the stream that the PUSH_PROMISE was sent upon. Reportedly, Firefox ties
> the affinity of a push to a "load group", whereas Edge is using a
> "navigation handle."
>
> It's not totally clear whether this is:
>  - a completely separate, non-HTTP cache
>  - a modification or addition to the HTTP cache itself
>  - a secondary level of HTTP caching with special usage rules
>  - etc.
>
> AIUI there are also variations about the scope of reuse itself; e.g.,
> whether you can push an HTML page to the browser and have it use that from
> cache  if the user clicks on a link.
>
> Right now, the requirements about HTTP caching and push are written as if
> the HTTP cache itself is fulfilling this role. E.g., RFC7540, Section 8.2
> says:
>
> > Pushed responses are considered successfully validated on the origin
> server (e.g., if the "no-cache" cache response directive is present
> (RFC7234, Section 5.2.2)) while the stream identified by the promised
> stream ID is still open.
>
> Looking through the history, this text was written this way mostly so that
> pushed responses could use the HTTP cache as a kind of rendezvous with
> requests from the page. That may be sensible, but it feels like the
> specification of the relationship of push to the HTTP cache isn't complete
> (and I'll also start a separate thread about other aspects there).
>
> I think there's an opportunity to clarify this, either in terms of HTTP
> caching, or browser behaviour (see <https://github.com/whatwg/
> fetch/issues/354>), or both.
>
> Furthermore, at the Workshop, there was some discussion about whether
> having this kind of "server push cache" as seperate from the HTTP cache was
> necessary; do we have any more data about why implementers feel it's
> necessary to have a reference from the page before insertion into the HTTP
> cache?
>
> Discuss.
>
> Cheers,
>
> --
> Mark Nottingham   https://www.mnot.net/
>
>
>


-- 
Alcides Viamontes E.
Chief Executive Officer, Zunzun AB
(+46) 722294542
(www.shimmercat.com is a property of Zunzun AB)