Re: HTTP/3 DATA_WITH_OFFSET frame

Samuel Hurst <samuelh@rd.bbc.co.uk> Thu, 18 February 2021 16:16 UTC

Return-Path: <samuelh@rd.bbc.co.uk>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AECD93A13DD for <quic@ietfa.amsl.com>; Thu, 18 Feb 2021 08:16:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 unaI56071T5x for <quic@ietfa.amsl.com>; Thu, 18 Feb 2021 08:16:55 -0800 (PST)
Received: from tlsmtp.bbc.co.uk (tlsmtp1.cwwtf.bbc.co.uk [132.185.160.173]) (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 D28083A13EF for <quic@ietf.org>; Thu, 18 Feb 2021 08:15:35 -0800 (PST)
Received: from gateh.lh.bbc.co.uk ([10.118.193.77]) by tlsmtp.bbc.co.uk (8.15.2/8.15.2) with ESMTPS id 11IGFWk3026352 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2021 16:15:33 GMT
Received: from mailhub0.rd.bbc.co.uk ([172.29.120.128]) by gateh.lh.bbc.co.uk (8.14.5+Sun/8.13.6) with ESMTP id 11IGFVqL021018; Thu, 18 Feb 2021 16:15:31 GMT
Received: from [172.29.197.148] (port=42036) by mailhub0.rd.bbc.co.uk with esmtp (Exim 4.92) (envelope-from <samuelh@rd.bbc.co.uk>) id 1lClxj-0002aR-M3; Thu, 18 Feb 2021 16:15:31 +0000
Subject: Re: HTTP/3 DATA_WITH_OFFSET frame
References: <5c96284e-ea35-0454-3c03-225e9bb5efd9@rd.bbc.co.uk> <20210218154857.GB145248@okhta>
Cc: IETF QUIC WG <quic@ietf.org>, ietf-http-wg@w3.org
To: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
From: Samuel Hurst <samuelh@rd.bbc.co.uk>
Autocrypt: addr=samuelh@rd.bbc.co.uk; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptRE1FWFZacHVSWUpLd1lC QkFIYVJ3OEJBUWRBTC9KNCtaMUVGRGNLR3ByNzdvYzZKRWVOemZXQ0t4VXBCNXJ6CnVUN0tm dHEwSTFOaGJYVmxiQ0JJZFhKemRDQThjMkZ0ZFdWc2FFQnlaQzVpWW1NdVkyOHVkV3MraUpZ RUV4WUkKQUQ0V0lRUi9NaG1CLzJtREdicVJEUUZGM3RxdVp0UWdLd1VDWFZacHVRSWJBd1VK Q1dZQmdBVUxDUWdIQWdZVgpDZ2tJQ3dJRUZnSURBUUllQVFJWGdBQUtDUkJGM3RxdVp0UWdL L0p6QVFEZUxZZjNSQVgzOTk3THgzcDZnbTZQClRCYlJSV2JVeDJ0VHovOTFzQytUREFFQTVz di9GdFdNN045VS83L0p2MDdQVkpGS0VTS3JQRENFdHBDSHdwbG0KblF5NE9BUmRWbW01RWdv ckJnRUVBWmRWQVFVQkFRZEFnVWpnZ09jb25pV0RFWkxQazBQNHVvRGtGMmZubFR1egpmSVpl dm9kTGhBNERBUWdIaUg0RUdCWUlBQ1lXSVFSL01obUIvMm1ER2JxUkRRRkYzdHF1WnRRZ0t3 VUNYVlpwCnVRSWJEQVVKQ1dZQmdBQUtDUkJGM3RxdVp0UWdLNys4QVFETFZlaW9rVlBIaUlG TXpWRzltS2dib3A1am1CQkkKazFpUWw5d0NJMVFOUVFEK0x1LzhRZnJPcjBSOGNEemUxSjlW Q0VmQmVjcjdROElHcVhCWHpZWkU4QTA9Cj1UNFJwCi0tLS0tRU5EIFBHUCBQVUJMSUMgS0VZ IEJMT0NLLS0tLS0K
Message-ID: <e616643f-45ed-6e69-9390-aed452e8f59e@rd.bbc.co.uk>
Date: Thu, 18 Feb 2021 16:15:27 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <20210218154857.GB145248@okhta>
Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="2WCS85OHjdTaHyUQjSvNVU710jTXeJmep"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/lt7ZBRugFjES6wHdd7NrlKTzjNA>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Feb 2021 16:16:57 -0000

On 18/02/2021 15:48, Dmitri Tikhonov wrote:
> Hello Sam,
> 
> An interesting draft!

Thank you!

> These are two different use cases: multicast over unreliable transport
> and multipart range requests.  Have you implemented the latter?  As an
> implementer, I would be curious to see how a receiver can take advantage
> of such framing.  I imagine that several read cursors would have to be
> maintained in case of missing STREAM frames and adjusted as more data
> comes in.  Then there is the matter of potentially overlapping STREAM
> frames due to retransmit.  Not that any of that can't be done, of
> course, but it would be an undertaking...

I have not implemented the latter yet, mostly because of a lack of time.
This has primarily come out of our unreliable transport work around
multicast, but it just so happens that with my familiarity with using
multipart range request I figured that it could benefit there too.

In terms of actually implementing the multirange support, my personal
approach would be to have the stream manage the retransmission and then
pass this to a HTTP layer within whatever library I'm using (as that was
my previous experience of playing with libraries like ngtcp2/nghttp3).
The DATA_WITH_OFFSET offset header would then just replace whatever
internal data counter I would have been using to synchronise the
position in the HTTP representation with the position in the stream.
This would then naturally skip ahead between ranges.

With the inclusion of the offset field, a potential optimisation could
be to not block the delivery of subsequent ranges while waiting for a
retransmission on a previous range? Which I think might tie into your
next point...

> From Section 3:
> 
>  " The purpose of the "DATA_WITH_OFFSET" frame is only to assist in
>  " locating a particular slice of data carried as part of an HTTP
>  " message payload, and not as a means to send data out of order.
>  " Senders MUST send data in order, i.e. with increasing values in the
>  " Offset field.
> 
> Why proscribe such use?  This may be an avenue for innovation or
> optimization.

I couldn't immediately think of any particular reason why an
implementation would want to send data out-of-order, and the existing H3
DATA frame must send in-order as it is tied to the stream frame to
derive the offset within the given HTTP representation being
transferred. However, if there are realistic use cases in this regard
then I'm more than happy to remove this proscription in a future version
of the draft.

-Sam