Re: Specifying Range in Link preload header for HTTP/2 Push?

Roger Pantos <rpantos@apple.com> Wed, 10 July 2019 22:50 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 5B98C120086 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 10 Jul 2019 15:50:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.751
X-Spam-Level:
X-Spam-Status: No, score=-2.751 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=apple.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 16DxwtqnlkVR for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 10 Jul 2019 15:50:52 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 77DBC12006A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 10 Jul 2019 15:50:52 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hlLNl-0001Ky-5f for ietf-http-wg-dist@listhub.w3.org; Wed, 10 Jul 2019 22:48:13 +0000
Resent-Date: Wed, 10 Jul 2019 22:48:13 +0000
Resent-Message-Id: <E1hlLNl-0001Ky-5f@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <rpantos@apple.com>) id 1hlLNj-0001KC-BC for ietf-http-wg@listhub.w3.org; Wed, 10 Jul 2019 22:48:11 +0000
Received: from nwk-aaemail-lapp02.apple.com ([17.151.62.67]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <rpantos@apple.com>) id 1hlLNh-0003GP-5b for ietf-http-wg@w3.org; Wed, 10 Jul 2019 22:48:11 +0000
Received: from pps.filterd (nwk-aaemail-lapp02.apple.com [127.0.0.1]) by nwk-aaemail-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x6AMkaRN059002; Wed, 10 Jul 2019 15:47:46 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=sender : from : message-id : content-type : mime-version : subject : date : in-reply-to : cc : to : references; s=20180706; bh=UbMX96XsmaUwDR/8YYDOcGt3/G4W1PoFJvWHWHsWgFk=; b=G77yO4ggTCT9EllmUzoIShSrmFgzfiMLVIdfhCEJB0yepoVhmoeGele0X0qImx09DmRV QcSxkcKcl6Qx6WwTZ6GjrKSSrNSWrlDJSp5BF7H2zSDv45f4A97ONj8l2lqhJWsM92S+ gvdCw1YKFkOIz7cfS6pu4xV4h9Xhi9Om1esIOAREoq392MQOvB/2AYtVJU+Cs8da0Iz8 qKtI0/Adu2IkxgiKDRZxe3JIKEW604NAVn3qN/jiaisHUmnpKVO/dCTBTJdmw/7HgjgR W2RvncL6QStKDrmrSoN/MlAUC7sIElRIF2XLvRwL1b4v0CA2/zdwkG4vQ0Mz8w6TVAFn bA==
Received: from mr2-mtap-s01.rno.apple.com (mr2-mtap-s01.rno.apple.com [17.179.226.133]) by nwk-aaemail-lapp02.apple.com with ESMTP id 2tjr7q4gcq-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 10 Jul 2019 15:47:46 -0700
Received: from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com [17.128.115.80]) by mr2-mtap-s01.rno.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPS id <0PUG00EFP7BM68I0@mr2-mtap-s01.rno.apple.com>; Wed, 10 Jul 2019 15:47:46 -0700 (PDT)
Received: from process_milters-daemon.nwk-mmpp-sz09.apple.com by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) id <0PUG0080074IJR00@nwk-mmpp-sz09.apple.com>; Wed, 10 Jul 2019 15:47:46 -0700 (PDT)
X-Va-A:
X-Va-T-CD: a440b47c9d920c133417a3c18d04d9f7
X-Va-E-CD: ebec9d363cb3e9032b1aa455ca769df0
X-Va-R-CD: c7d42333b7d05fd8c8092e8412552c6e
X-Va-CD: 0
X-Va-ID: 296cba58-9ff1-4a62-889a-23b1262ca92b
X-V-A:
X-V-T-CD: a440b47c9d920c133417a3c18d04d9f7
X-V-E-CD: ebec9d363cb3e9032b1aa455ca769df0
X-V-R-CD: c7d42333b7d05fd8c8092e8412552c6e
X-V-CD: 0
X-V-ID: 82f1cc93-b1d0-4413-9d9e-9ae87c6345c3
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-10_08:,, signatures=0
Received: from mesquite.apple.com (mesquite.apple.com [17.194.77.14]) by nwk-mmpp-sz09.apple.com (Oracle Communications Messaging Server 8.0.2.4.20190507 64bit (built May 7 2019)) with ESMTPSA id <0PUG0008H7BKGU60@nwk-mmpp-sz09.apple.com>; Wed, 10 Jul 2019 15:47:44 -0700 (PDT)
Sender: rpantos@apple.com
From: Roger Pantos <rpantos@apple.com>
Message-id: <6ABB0CB9-B51E-4416-9A04-69FF00C36595@apple.com>
Content-type: multipart/alternative; boundary="Apple-Mail=_480EDDAC-1C2F-4004-8153-2EA8C55E898F"
MIME-version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Wed, 10 Jul 2019 15:47:44 -0700
In-reply-to: <CACj=BEiCTVjKKnMmsYhxYXwJT_OoS+zJ5U4q2gCzH_jb+3Wx3g@mail.gmail.com>
Cc: Bence Béky <bnc@chromium.org>, HTTP Working Group <ietf-http-wg@w3.org>
To: Yoav Weiss <yoav@yoav.ws>
References: <63CAE7E1-34E9-42DA-A7DD-1E17223032AE@apple.com> <CALGR9oaNnSKp-a8tj+7ojc_g+AhJQ4jF5Z738mjhXhoesfYqLg@mail.gmail.com> <CC99D5CA-1C8B-4200-A6D4-059ABCD6DBA8@apple.com> <D2C627CF-C1D3-459E-8489-CD0530A30A9B@apple.com> <C1CBCD79-7D43-4346-AD79-11658F848126@apple.com> <CACMu3tqTtStsBL1eQ8HPxcyuH7WrTTAKxioob7gN5msZL0HG0A@mail.gmail.com> <732745DA-6CFC-4D02-B052-EDE94C89FC13@apple.com> <CACj=BEiCTVjKKnMmsYhxYXwJT_OoS+zJ5U4q2gCzH_jb+3Wx3g@mail.gmail.com>
X-Mailer: Apple Mail (2.3445.104.11)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-10_08:, , signatures=0
Received-SPF: pass client-ip=17.151.62.67; envelope-from=rpantos@apple.com; helo=nwk-aaemail-lapp02.apple.com
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1hlLNh-0003GP-5b cb7165184268ece61327d58dbb063602
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Specifying Range in Link preload header for HTTP/2 Push?
Archived-At: <https://www.w3.org/mid/6ABB0CB9-B51E-4416-9A04-69FF00C36595@apple.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36786
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>


> On Jul 10, 2019, at 1:57 PM, Yoav Weiss <yoav@yoav.ws> wrote:
> 
> Hey Roger,
> 
> If the goal is to extend preload (e.g. with a new attribute), I believe the best route would be to open an issue on the preload repo <https://github.com/w3c/preload/issues> with your use-case and we can discuss it further there. 

Hi Yoav. That might be a good way to go about it. Although would doing it that way would limit its use to rel=preload? That would work for me, but I wonder if there's a wider interest in defining Range for other Link types. Hopefully anyone who has such interest will chime in here.

> I also believe that such an attribute would be considered an extension attribute <https://tools.ietf.org/html/rfc8288#section-3.4.2> from a WebLinking perspective, but I may be wrong on that front.

I think that you're right.

> 
> Regarding such an attribute, have you considered what would be its impact on the browser itself? Should the browser use that range for the request as well? (assuming the header doesn't get stripped off by the server)

The h2 client implementations that I've surveyed do a fairly straightforward matching between an incoming application request and whatever's in the push cache. So for instance they would find a match if the request has the exact same range as something in the push cache, but not if the request has, say, a sub-range of that. Which is a long way of saying that if you want it to work reliably, the client should probably ask for the same range as the push. It so happens that in the particular application of LL-HLS, that always happens.


Roger.

> 
> Cheers,
> Yoav
> 
> On Wed, Jul 10, 2019 at 6:34 PM Roger Pantos <rpantos@apple.com <mailto:rpantos@apple.com>> wrote:
> 
> 
> > On Jul 10, 2019, at 5:10 AM, Bence Béky <bnc@chromium.org <mailto:bnc@chromium.org>> wrote:
> > 
> > Hi,
> > 
> > FYI I worked on this in Chrome a little more about a year ago, aiming
> > to do something simple, with no particular use case in mind.
> 
> > Currently range request pushes are accepted, but matched with requests
> > only if the range matches exactly.  Caching in this case is trivial.
> > I imagine this would be relatively easy to implement in other clients
> > as well.
> 
> Hi Bence. Thanks for the additional detail.
> 
> > 
> > If you could work some client side JS magic to issue requests with the
> > same range that the server has pushed, it would work with Chrome
> > today.  
> 
> That will be the case in LL-HLS. The primary resource (that triggers the push) is actually the active manifest. It contains the URI and byte range of the pushed resource. Upon receiving the manifest update the client will request that specific range.
> 
> > The only caveat is that Chrome only allows one pushed stream
> > with any given URL, so you wouldn't be able to push the second range
> > for the same resource until the first one is matched by a request,
> 
> That should be workable.
> 
> > which of course the server has no insight into seeing when it happens.
> > I imagine other client might have a similar restriction.  In fact,
> > about 40% of incoming pushes are rejected as duplicate URL, indicating
> > that many servers are pushing the same request repeatedly on a single
> > connection, therefore rejecting such pushes seems like a necessary
> > optimization to avoid wasting downlink.
> 
> Agreed, but that shouldn’t happen with LL-HLS. The client affirmatively asks for the push at the application layer (via a query parameter on the manifest request). It will only ask if it needs the media resource. 
> 
> 
> thanks,
> 
> Roger.
> 
> > 
> > Cheers,
> > 
> > Bence
> > 
> > 
> > On Tue, Jul 9, 2019 at 11:26 PM Roger Pantos <rpantos@apple.com <mailto:rpantos@apple.com>> wrote:
> >> 
> >> 
> >> 
> >> On Jul 9, 2019, at 7:01 PM, Leif Hedstrom <lhedstrom@apple.com <mailto:lhedstrom@apple.com>> wrote:
> >> 
> >> 
> >> 
> >> On Jul 9, 2019, at 19:05, Roger Pantos <rpantos@apple.com <mailto:rpantos@apple.com>> wrote:
> >> 
> >> 
> >> 
> >> On Jul 9, 2019, at 4:03 PM, Lucas Pardue <lucaspardue.24.7@gmail.com <mailto:lucaspardue.24.7@gmail.com>> wrote:
> >> 
> >> Hi Roger,
> >> 
> >> On Tue, 9 Jul 2019, 21:36 Roger Pantos, <rpantos@apple.com <mailto:rpantos@apple.com>> wrote:
> >>> 
> >>> Greetings HTTP experts,
> >>> 
> >>> I’m interested in employing HTTP/2 Push of Range requests for media streaming. It seems like the core h2 protocol handles this well enough; the PUSH_PROMISE can contain a Range header, and at the very least if that ends up in the client push cache then a request for that exact Range should match.
> >>> 
> >>> That being said, I’d also like to signal the push request to downstream HTTP caches. Push is typically signaled via the Link header with rel=preload, but https://www.w3.org/TR/preload/ <https://www.w3.org/TR/preload/> doesn’t seem to define signaling and associated Range.
> >>> 
> >>> Has anyone defined a Link extension to signal an associated Range?
> >> 
> >> 
> >> I've spoken informally to some people on related topics. I presume this is related to Apple's LHLS? Or in lay speak, one approach to low-latency HTTP-based streaming. It'd be great to have a reference to cite when talking around the topic.
> >> 
> >> 
> >> That’s right. Here’s a link to the current white paper: https://developer.apple.com/documentation/http_live_streaming/protocol_extension_for_low-latency_hls_preliminary_specification <https://developer.apple.com/documentation/http_live_streaming/protocol_extension_for_low-latency_hls_preliminary_specification>
> >> 
> >> 
> >>> 
> >>> If not, would anyone object to the following Link extension?
> >>> 
> >>> range-link-extension = “range” = ranges-specifier
> >>> 
> >>> where ranges-specifier is defined in RFC 2616.
> >>> 
> >>> An example would be:
> >>> 
> >>> Link: </media.mp4>; rel=preload; as=video; type=video/mp4; range=1380-14226
> >>> 
> >>> 
> >>> thanks,
> >>> 
> >>> Roger Pantos
> >>> Apple Inc.
> >> 
> >> 
> >> The general impression I've observed is that such a range signal in Link would be useful to a number of services, and that there would be benefit in adopting a common signal.
> >> 
> >> Furthermore, while the use of server push might have debatable benefits for the web browsing use case. I'm led to believe that it has affirmative uses in this streaming model. Again, some evidential data would be really interesting.
> >> 
> >> 
> >> The use of Push in our LL-HLS design eliminates one round trip per (partial) media segment downloaded. We’ve got data that shows round trip times to media servers can exceed 100 (or even 200) ms, particularly on cellular networks, even in the U.S.
> >> 
> >> When playing at very low delay-from-live (2s or less), the client can only buffer around 1s ahead of the playhead (because that’s all there is). New segments must be loaded in a timely fashion to prevent playback from stalling. Speeding that up by 10% of the overall budget is a significant win.
> >> 
> >> In addition, keeping the TCP send pipe full improves lost-packet recovery performance of the primary resource that accompanies the push (via fast retransmit).
> >> 
> >> 
> >> Finally, server push and caching is an interesting area that might benefit from some more information. Some of the WG might be interested in how this gets implemented in your use case.
> >> 
> >> 
> >> Certainly. I’d be happy to answer as I’m able to.
> >> 
> >> 
> >> FWIW, server push sort of dictates that you can write the object to cache if I recall.
> >> 
> >> 
> >> Absolutely. That’s what we want.
> >> 
> >> 
> >> That much said, caching partial objects can be tricky at best. Do you treat each range as a unique object ?
> >> 
> >> 
> >> That’s the simplest approach, and it should work pretty well for LL-HLS. From a cache point of view it’s effectively the same as the non-byterange case, where each partial segment has its own URL.
> >> 
> >> If so, how do you avoid an explosion in various range sizes?
> >> 
> >> 
> >> There shouldn’t be much of an explosion. The byte ranges pushed are determined by the origin, and there won’t be more than about 20 per URL. So it hopefully won’t hurt cache search performance too much.
> >> 
> >> If you try to combine partial objects into one larger object,  the cache code tend to get tricky (we gave up in ATS).
> >> 
> >> This is probably something worthwhile discussing to understand the implications both on servers and clients. It’s non trivial, but definitely interesting!
> >> 
> >> 
> >> Agreed,
> >> 
> >> 
> >> Roger.
> >> 
> >> 
> >> Cheers,
> >> 
> >> — Leif
> >> 
> >> 
> >> If there’s nothing currently defined, what would be the next step? To write an Internet-Draft specifying the Link extension?
> >> 
> >> (I’m also interested in a way for a server to indicate that pushed resources are to be strictly ordered (such as via a dependency tree). Today, multiple pushes get multiplexed at the default priority. But that’s a different discussion.)
> >> 
> >> 
> >> Roger.
> >> 
> >> 
> >> Cheers
> >> Lucas
> >> 
> >> 
> > 
> > 
> 
>