Re: [Hls-interest] LL-HLS: status-code expected in the response to the PRELOAD request

"Law, Will" <wilaw@akamai.com> Tue, 18 August 2020 18:06 UTC

Return-Path: <wilaw@akamai.com>
X-Original-To: hls-interest@ietfa.amsl.com
Delivered-To: hls-interest@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 174AA3A09A3 for <hls-interest@ietfa.amsl.com>; Tue, 18 Aug 2020 11:06:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.988
X-Spam-Level:
X-Spam-Status: No, score=-1.988 tagged_above=-999 required=5 tests=[AC_DIV_BONANZA=0.001, BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=akamai.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 1XzMNnSuNq7R for <hls-interest@ietfa.amsl.com>; Tue, 18 Aug 2020 11:06:35 -0700 (PDT)
Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [IPv6:2620:100:9005:57f::1]) (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 0F8463A099B for <hls-interest@ietf.org>; Tue, 18 Aug 2020 11:06:34 -0700 (PDT)
Received: from pps.filterd (m0050102.ppops.net [127.0.0.1]) by m0050102.ppops.net-00190b01. (8.16.0.42/8.16.0.42) with SMTP id 07IHtxNm027248 for <hls-interest@ietf.org>; Tue, 18 Aug 2020 19:06:34 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=jan2016.eng; bh=NC3tfjp0Bw8mR9lWRg+jWB/axtGXspdF02gT8Eg+fZA=; b=nsaqUQUnhHWXnGyNCofm32RiVH5PiNabDdQY8ktFPhQnt7oEpIhDQbA6hpj26JLik7wi WlSg/ZiUeJ4aQcL3Xa/fxKJHraDtBJclQY+xL4UF/TnsqwiDCbwB7SnuPnKgYoeDpXwP xQMFCNCkZXt7BlzZLZ0D8QJJVqtWwbVV9nsOVDiL2nQWykwyue6QrgNiYH7yLNDR8WqG mNwVv1TZafL/cS+yb5nJ9x+yA8hl27dA06JJlUH655MWPLp1I4O4yxZGoNYLsBKcTpna C9iu5S9tXhE/WQ2An8E7stgO7SaQp1QVLUnUM0eEBnUN5X0a0W6hcIZynaxxpcAiFjnE Mw==
Received: from prod-mail-ppoint3 (a72-247-45-31.deploy.static.akamaitechnologies.com [72.247.45.31] (may be forged)) by m0050102.ppops.net-00190b01. with ESMTP id 3304m2gvcs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <hls-interest@ietf.org>; Tue, 18 Aug 2020 19:06:33 +0100
Received: from pps.filterd (prod-mail-ppoint3.akamai.com [127.0.0.1]) by prod-mail-ppoint3.akamai.com (8.16.0.42/8.16.0.42) with SMTP id 07II5eNU023374 for <hls-interest@ietf.org>; Tue, 18 Aug 2020 14:06:33 -0400
Received: from email.msg.corp.akamai.com ([172.27.165.112]) by prod-mail-ppoint3.akamai.com with ESMTP id 32xb1xqxcy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for <hls-interest@ietf.org>; Tue, 18 Aug 2020 14:06:32 -0400
Received: from USTX2EX-DAG1MB2.msg.corp.akamai.com (172.27.165.120) by ustx2ex-dag1mb3.msg.corp.akamai.com (172.27.165.121) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 18 Aug 2020 13:06:31 -0500
Received: from USTX2EX-DAG1MB2.msg.corp.akamai.com ([172.27.165.120]) by ustx2ex-dag1mb2.msg.corp.akamai.com ([172.27.165.120]) with mapi id 15.00.1497.006; Tue, 18 Aug 2020 13:06:31 -0500
From: "Law, Will" <wilaw@akamai.com>
To: "hls-interest@ietf.org" <hls-interest@ietf.org>
Thread-Topic: [Hls-interest] LL-HLS: status-code expected in the response to the PRELOAD request
Thread-Index: AQHWdO5T3mcQ3bppNkmHQetDl7AqvKk9oKwAgABoh4A=
Date: Tue, 18 Aug 2020 18:06:31 +0000
Message-ID: <0CFBAB3E-7AAB-4371-B3E9-1A6C2F55AA73@akamai.com>
References: <05DC4355-8B2D-4A1F-A223-7B4E9DE1EF63@akamai.com> <CAAqSTpmAp9YQ=x7CmEQsNQaGGOMD0WA1UD0_0FevJW1gkhO38w@mail.gmail.com>
In-Reply-To: <CAAqSTpmAp9YQ=x7CmEQsNQaGGOMD0WA1UD0_0FevJW1gkhO38w@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/16.39.20071300
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [172.27.118.139]
Content-Type: multipart/alternative; boundary="_000_0CFBAB3E7AAB4371B3E91A6C2F55AA73akamaicom_"
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-18_12:2020-08-18, 2020-08-18 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 phishscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008180123
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-18_12:2020-08-18, 2020-08-18 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 mlxscore=0 spamscore=0 malwarescore=0 priorityscore=1501 adultscore=0 phishscore=0 impostorscore=0 suspectscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008180125
Archived-At: <https://mailarchive.ietf.org/arch/msg/hls-interest/S1km9sBsGatSoldR-ETdqtw1S8s>
Subject: Re: [Hls-interest] LL-HLS: status-code expected in the response to the PRELOAD request
X-BeenThere: hls-interest@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussions about HTTP Live Streaming \(HLS\)." <hls-interest.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hls-interest/>
List-Post: <mailto:hls-interest@ietf.org>
List-Help: <mailto:hls-interest-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Aug 2020 18:06:38 -0000

@Mark<mailto:mgreve@akamai.com> @Lucas – thank you both for your quick responses, both pointing at RFC8673 https://www.rfc-editor.org/rfc/rfc8673.html. This does address the exact problem. The solution is outlined below for those who want a primer. It revolves around the client signaling a magic number last-byte-pos which is “much larger than the last-byte-pos returned in response to an open-ended byte-range HEAD request, as described above, and much larger than the expected maximum size of the representation.” . This leads to the obvious problem of what threshold value should an origin or CDN use? A stateless edge server has no idea what is “the expected maximum size of the representation”.

All CDNs should use the same threshold value, for consistency of client responses. Additionally, all LL-HLS origins should also apply the same threshold, for the same reason. The RFC makes a recommendation to use 2^^53-1 (9007199254740991) as the threshold. It is Javascript safe and in fact corresponds to Number.MAX_SAFE_INTEGER. Akamai is implementing this as we speak, and our current intent is to use 9007199254740991. However some flexibility to align with the status quo and we are willing to align with other CDNs for industry consistency in support.

@Mark – what threshold value does Fastly use?

@Lucas – what threshold value does Cloudflare use?

@Other CDN implementers on this list – what value do you use?

Equally, all LL-HLS clients should use the same threshold value. For those building LL-HLS clients that support byte range addressing, any objections to using 9007199254740991?



----------------------------------------------------------------

A client can indicate support for handling indeterminate-length byte-range responses by providing a very large value for the last-byte-pos in the byte-range request. For example, a client can perform a byte-range GET request of the form:

GET /resource HTTP/1.1
Host: example.com
Range: bytes=1230000-999999999999

where the last-byte-pos in the request is much larger than the last- byte-pos returned in response to an open-ended byte-range HEAD request, as described above, and much larger than the expected maximum size of the representation. See Section 6 for range value considerations.

In response, a server may indicate that it is supplying a continuously aggregating/live response by supplying the client request's last-byte-pos in the Content-Range response header field.

For example:

GET /resource HTTP/1.1
Host: example.com
Range: bytes=1230000-999999999999

returns

HTTP/1.1 206 Partial Content
Content-Range: bytes 1230000-999999999999/*

from the server to indicate that the response will start at byte
1230000 and continue indefinitely to include all aggregated content,
as it becomes available.

Cheers
Will


From: Pieter-Jan Speelmans <pieter-jan.speelmans@theoplayer.com>
Date: Monday, August 17, 2020 at 9:53 PM
To: "Law, Will" <wilaw@akamai.com>
Cc: "hls-interest@ietf.org" <hls-interest@ietf.org>
Subject: Re: [Hls-interest] LL-HLS: status-code expected in the response to the PRELOAD request

Hi all

Related to that:

To start-up, the client would issue 6 GET range-requests , starting at the independent part The server would respond with a 206 response for each and a content-range response header indicating the range being returned.
An optimisation we have considered from a client side would be to identify those 6 range requests would actually fold together in one larger range request (and potentially the request for the preload hint as well). Folding the first six requests together should be OK according to normal HTTP flows.

What would be the expected behaviour however if the preload-hint request also gets collapsed into this or simply the asset v1_1-7728.m4s would be requested without a range request at all?

Best regards,
Pieter-Jan


Pieter-Jan Speelmans
CTO

THEO Technologies NV
w | www.theoplayer..com<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.theoplayer.com_&d=DwMFaQ&c=96ZbZZcaMF4w0F4jpN6LZg&r=KkevKJerDHRF9WRs8nW8Ew&m=3V-L-7irWJaIKqd70_fh4S30y0kfh-uHlFMaZnMQJfo&s=zRH5_eqUYPpnZnmTuXadhCfqsPz4Kf1T4_9-KmoNRpk&e=>
Philipssite 5, Bus 1. 3001 Leuven, Belgium
[Image removed by sender.]<https://urldefense.proofpoint.com/v2/url?u=https-3A__d2oj23ymxjbl3l.cloudfront.net_&d=DwMFaQ&c=96ZbZZcaMF4w0F4jpN6LZg&r=KkevKJerDHRF9WRs8nW8Ew&m=3V-L-7irWJaIKqd70_fh4S30y0kfh-uHlFMaZnMQJfo&s=Q6XrRZNHy3KpCquvR83tEmqOc-klGILP6gPYJegRx7s&e=>
Leuven (Belgium) - New York (US) - San Francisco (US) - Singapore (SG) - Barcelona (ES)
BTW: BE 0847.829.290, RPR: Leuven


On Tue, Aug 18, 2020 at 1:30 AM Law, Will <wilaw=40akamai.com@dmarc.ietf.org<mailto:40akamai.com@dmarc.ietf.org>> wrote:
Hello

I am requesting a clarification on the expected server response status code when a client makes an open-ended range request against a media segment when playing back LL-HLS.  Consider the following media playlist snippet:

#EXTINF:4..000,
v1_1-7727..m4s
#EXT-X-PROGRAM-DATE-TIME:2020-07-28T17:37:48.771Z
#EXT-X-PART:DURATION=0.500,URI="v1_1-7728.m4s",BYTERANGE="64267@0",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.500,URI="v1_1-7728.m4s",BYTERANGE="63033@64267"
#EXT-X-PART:DURATION=0.500,URI="v1_1-7728.m4s",BYTERANGE="57810@127300"
#EXT-X-PART:DURATION=0.500,URI="v1_1-7728.m4s",BYTERANGE="60558@185110"
#EXT-X-PART:DURATION=0.500,URI="v1_1-7728.m4s",BYTERANGE="68575@245668"
#EXT-X-PART:DURATION=0.500,URI="v1_1-7728.m4s",BYTERANGE="60880@314243"
#EXT-X-PRELOAD-HINT:TYPE=PART,URI="v1_1-7728.m4s",BYTERANGE-START=375123

To start-up, the client would issue 6 GET range-requests , starting at the independent part The server would respond with a 206 response for each and a content-range response header indicating the range being returned.

The next request would be for the PRELOAD-HINT part. This would be a GET request with a “range: 375123-“. The client is indicating it wants to receive this object starting at offset 375123 and continuing to the end of the segment.

How should the origin (or proxy server) respond to this PRELOAD request? Three possible options

  1.  It holds back any response until the end of segment, returning at that time a 206 response with a content-range of 375123 – T/T+1 (where represents total size of segment). This would ruin the low latency behavior for the client.
  2.  It starts an immediate response, signaling 206 with content-range: 375123 - */*. This is actually forbidden by the RFC’s, which indicate that the last-byte-pos cannot hold a value of “*”.
  3.  It starts an immediate response, signaling a 200 response and if serving H1 to a proxy server which then serves H2 to the client, a "Transfer-Encoding: chunked" response header.

Option [3] looks to be the most correct however it raises the question of  whether a 200 response (chunked-transfer or not) implies to the client that is has received the complete object i.e starting at offset 0 instead of offset 375123. As a CDN, we need to build a behavior that is robustly supported by all HTTP clients and not just a particular class of application. The proxy-server cannot tell if is serving a LL-HLS client or some other client, therefore we need a consistent behavior when it is asked for an open-ended range request against an object of unknown size.

So the questions are:

  1.  Is a 200 status-code expected in the response to the PRELOAD request?
  2.  If so, are there other clients or applications on the internet that would break if we did so for all open-ended range requests against objects of unknown size (outside of the application space of LL-HLS)?

Cheers
Will



--
Hls-interest mailing list
Hls-interest@ietf.org<mailto:Hls-interest@ietf.org>
https://www.ietf.org/mailman/listinfo/hls-interest<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_hls-2Dinterest&d=DwMFaQ&c=96ZbZZcaMF4w0F4jpN6LZg&r=KkevKJerDHRF9WRs8nW8Ew&m=3V-L-7irWJaIKqd70_fh4S30y0kfh-uHlFMaZnMQJfo&s=lAcAl0Wr7tRdhayCf3crO76tH1jgoJAQ8ant2PDXpCA&e=>

Legal Notice
You can find the latest terms and policies of THEO Technologies under www.theoplayer.com/terms<https://urldefense.proofpoint.com/v2/url?u=http-3A__www.theoplayer.com_terms&d=DwMFaQ&c=96ZbZZcaMF4w0F4jpN6LZg&r=KkevKJerDHRF9WRs8nW8Ew&m=3V-L-7irWJaIKqd70_fh4S30y0kfh-uHlFMaZnMQJfo&s=raivU9TwEr7KoP4i_LeGjwPIRM5Tn_6GWXUoLm5wiN4&e=> including our "GENERAL TERMS AND CONDITIONS". In the absence of a signed agreement between you and THEO Technologies, by replying to this email these terms apply to the relevant transaction between us.
The contents of this email message and any attachments are intended solely for the addressee(s) and contain CONFIDENTIAL and/or privileged information and are legally protected from disclosure. If you are not the intended recipient of this message, please immediately alert the sender by reply email and then delete this message including any attachments and you are hereby notified that any use, dissemination, copying, or storage of this message or its attachments is strictly prohibited.
Full security of emails over the internet cannot be ensured. Despite our efforts it is your responsibility to provide for your protection.
Global HQ: THEO Technologies NV, Philipssite 5 bus 1, 3001 Heverlee, Belgium - BE 0847.829.290 - CEO: Steven Tielemans