Re: new draft: RELIABLE_RESET_STREAM

Kazuho Oku <kazuhooku@gmail.com> Mon, 20 February 2023 11:51 UTC

Return-Path: <kazuhooku@gmail.com>
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 5AD28C1595FE for <quic@ietfa.amsl.com>; Mon, 20 Feb 2023 03:51:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y9W_HfyVXHIj for <quic@ietfa.amsl.com>; Mon, 20 Feb 2023 03:51:01 -0800 (PST)
Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E03AFC1595E5 for <quic@ietf.org>; Mon, 20 Feb 2023 03:51:00 -0800 (PST)
Received: by mail-ed1-x529.google.com with SMTP id h32so3796602eda.2 for <quic@ietf.org>; Mon, 20 Feb 2023 03:51:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1B+JU2PSRnYm4yhgpvNvpO8SGwcRCBqsjKRWbmdm04k=; b=OpJP7/Xs4KO5sSA5VzQGjpuXsJLuAIPFxRxRudJHt106e9n0ixVc3f3LUMF9h1lVVJ VIHs2gNlq9IJ6O23zFDU7LyElpi4MwML/i3AqSBVKn4spwvwG7VUzU8at4bjgibJ4aK3 G0OwipcxfTxrfA3sxznjJuqF11U/T/DBOYlNrpkBVxt0DoxGyp12Te+9b2w9lHX46zP1 +2Qd4Y587pmOlD9nvlJh+OSxtQNpktsz420AU+QxI7b9ZB5GOwejhe8jIr46WYg7b8Fd WBeISK2/e8Cy37w+98yYbTQDBmGim3bXS0M+/6uCHgZh52j0TpSrivHSla2blLhrb99Y 5xxg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1B+JU2PSRnYm4yhgpvNvpO8SGwcRCBqsjKRWbmdm04k=; b=dIccN6VJqt3YKfHFS+/Fu2xEOmhQg9iJcR70PYEeAl55eR6DT5KOiw55TPe4YEN3OA W1bwHQrF4kQTl70t7Q6XN0rca3dxF4SuE6VitXucOVsYYHPtZYGU4ZU0mk6RI2Tq/OWw cSNxpC5c9LxbMd/lKI2zhhA7ulNi3rw3qJ2J9pgCfT9WUdRddJDC9Uty7mA+waeiSaDF fgmvq/9oq8iW1LdOimHBADeoHKvARWU+UyMCqn64l0fieYoq98rBtv4BYahMrjzXXoTO lLObHFzxYyiGMhfOPhhFARLiIqQBD7lrLLAJ02CslsA3Av0SRfgRg8rlaHv1R4rBJDQL S/Sg==
X-Gm-Message-State: AO0yUKVgcceSukrU9NwA6KyaFatVhxJvMoUu19pBRujY1H9tXsKCN6HO tGps6WcpM00p/0RBNkqK6G3d6k+CfLKDKli0Tto=
X-Google-Smtp-Source: AK7set9jPauYshN7tkfqJDGLJ6/nh+jE6BtcU9UwfjEMADJQWrTR3tDBdJZCOr+jjSFwhzz2oFDFBSo0h21a2jXUWW0=
X-Received: by 2002:a17:906:4f0b:b0:8b2:d871:d74a with SMTP id t11-20020a1709064f0b00b008b2d871d74amr4263876eju.10.1676893859149; Mon, 20 Feb 2023 03:50:59 -0800 (PST)
MIME-Version: 1.0
References: <CAOYVs2rQWUbd02jz7ywDi1xcx30wD1PSf-GRi3ZrPmGnXouy2A@mail.gmail.com> <CE1479D5-4B98-4B37-999A-E60B580E7F2E@ericsson.com> <CAOYVs2oeyS3eUgU+e_7QRukitD1Jga0hXCfbKRARTLU03WT4zg@mail.gmail.com> <565C27F0-513C-4F99-BCD3-593AAAEFD49A@ericsson.com> <CAOYVs2qJU9okQQ2QdkGrZoKEB4RG9ta2_003rdOh8m8mN9LXyA@mail.gmail.com> <CADdTf+hz9ZMBma0GFxBO3Pn-a4mB8_fVURnPTyP97SxXAjBM-A@mail.gmail.com>
In-Reply-To: <CADdTf+hz9ZMBma0GFxBO3Pn-a4mB8_fVURnPTyP97SxXAjBM-A@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Mon, 20 Feb 2023 20:50:47 +0900
Message-ID: <CANatvzxc1BMwgwNB8DcZSTXF0tehiUfRib5zgD-qa3_stz=QuA@mail.gmail.com>
Subject: Re: new draft: RELIABLE_RESET_STREAM
To: Matt Joras <matt.joras@gmail.com>
Cc: Marten Seemann <martenseemann@gmail.com>, Mirja Kuehlewind <mirja.kuehlewind@ericsson.com>, QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000ccfcc005f520469b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/oqAG6yeKB_KNgwDS5iPMVmCu8Qw>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.39
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: Mon, 20 Feb 2023 11:51:02 -0000

I know it's been long since we discussed this proposal last time, but I
would like to point out that we did discuss about the same problem during
the development of HTTP/3; see
https://github.com/quicwg/base-drafts/issues/3300.

The argument there (by me) was that it would be helpful for HTTP/3 server
to have a way of resetting streams reliably (like the one proposed by
Marten's draft), because it allows an intermediary to forward an abrupt
close of an HTTP message exactly the way the intermediary received.

So yes, there is a use case for HTTP/3 as well for this proposal.


2022年9月27日(火) 3:45 Matt Joras <matt.joras@gmail.com>:

> Hi Marten,
> (no hats worn)
>
> The problem this is solving for WebTransport is real, and it's definitely
> tricky. That being said, solving this by complicating the stream semantics
> of a reset feels somewhat unpalatable to me. Today the semantics of the
> reset are straightforward, whereas this introduces complexity for both the
> sender and the receiver in juggling things in this "pending" state.
>
> I am wondering if a simpler solution would be adding a new type of
> RST_STREAM frame which carries auxiliary application information. For
> example, if the application could encode the application stream type in
> this auxiliary information then the reset itself (and its API communicating
> with the application) would completely encode the necessary information for
> the application, without having to make any changes to stream state.
>
> Matt Joras
>
> On Fri, Sep 23, 2022 at 6:21 AM Marten Seemann <martenseemann@gmail.com>
> wrote:
>
>> Hi Mirja,
>>
>> > I guess my question is more what would you do with this information
>> then if the stream is already closed?
>>
>> This might sound pedantic, but the stream is not closed. The *send
>> direction* of the stream is *reset* according to
>> https://datatracker.ietf.org/doc/html/rfc9000#section-3.1. The *receive
>> direction* of the stream is still open, and there are now many different
>> ways how the peer might react to that situation.
>> To stick to the canceled file upload example, the server may send a HTML
>> page "The upload was canceled. Please try uploading again." on its side of
>> the stream before closing it. Obviously, setting a HTTP payload doesn't
>> make any sense on a WebTransport stream (there might be a WebTransport
>> session using the same underlying QUIC connection!), so it's imperative to
>> know where the stream belongs. The same reasoning applies when
>> multiple WebTransport sessions share the same QUIC connection.
>>
>> > Also in your case of know the session ID, this seems like a complicated
>> hack. Because if you anyway have to change something in the quick stack,
>> wouldn’t it be sufficient to just create a new interface to expose the
>> session ID given it should be known by the QUIC stack, no?
>>
>> This is exactly the problem that RELIABLE_RESET_STREAM solves: The QUIC
>> stack doesn't necessarily know the Session ID. If the STREAM frame carrying
>> the Session ID is declared lost after the stream was reset (using the
>> regular QUIC RESET_STREAM frame), the sender's QUIC stack won't retransmit
>> it. It's totally possible that all that the receiver receives regarding
>> this stream is the RESET_STREAM frame, and no STREAM frames at all.
>>
>> Cheers,
>> Marten
>>
>>
>> On Fri, Sep 23, 2022 at 3:53 PM Mirja Kuehlewind <
>> mirja.kuehlewind@ericsson.com> wrote:
>>
>>> Hi Martin,
>>>
>>>
>>>
>>> thanks for your reply. Please see below.
>>>
>>>
>>>
>>> *From: *Marten Seemann <martenseemann@gmail.com>
>>> *Date: *Friday, 23. September 2022 at 12:24
>>> *To: *Mirja Kuehlewind <mirja.kuehlewind@ericsson.com>
>>> *Cc: *QUIC WG <quic@ietf.org>
>>> *Subject: *Re: new draft: RELIABLE_RESET_STREAM
>>>
>>>
>>>
>>> Hi Mirja,
>>>
>>>
>>>
>>> > 1. How can you guarantee that any data can be delivered reliably if
>>> the sender is indicating that it won’t retransmit?
>>>
>>>
>>>
>>> That's the new semantics of the RELIALBE_RESET_STREAM frame. Sending
>>> one indicates that you'll reliably retransmit everything up to the
>>> "Reliable Size" byte offset. You don't retransmit anything after that
>>> offset.
>>>
>>>
>>>
>>> > 2. If the sender sends the reset before any stream data is ever
>>> delivered to the application, why do you still need to deliver the session
>>> id (given the stream will never be used)? Or maybe asked differently, why
>>> is the sender sending a reset at all?
>>>
>>>
>>>
>>> I'm not sure I understand the question. In general, you send a
>>> RESET_STREAM (or RELIABLE_RESET_STREAM) because you changed your mind after
>>> you started transmitting data. A standard example from the HTTP world is
>>> that the user starts the upload of a large file, and then cancels that
>>> upload. For WebTransport it depends on your application protocol.
>>>
>>> The reason you want to associate the stream with the correct session is
>>> that the semantics of a stream reset might differ depending on the
>>> application protocol: The server might respond differently to a HTTP/3
>>> stream being reset vs. a WebTransport stream being reset (or even: a
>>> WebTransport stream being reset for Session ID 1 and Session ID 2). We have
>>> this problem since a single QUIC connection can handle HTTP/3 streams and
>>> WebTransport streams for multiple WebTransport sessions at the same time.
>>>
>>>
>>>
>>> I guess my question is more what would you do with this information then
>>> if the stream is already closed?
>>>
>>>
>>>
>>> Also in your case of know the session ID, this seems like a complicated
>>> hack. Because if you anyway have to change something in the quick stack,
>>> wouldn’t it be sufficient to just create a new interface to expose the
>>> session ID given it should be known by the QUIC stack, no?
>>>
>>>
>>>
>>> Mirja
>>>
>>>
>>>
>>>
>>>
>>> Does that answer your questions?
>>>
>>>
>>>
>>> Cheers,
>>> Marten
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Sep 20, 2022 at 7:16 PM Mirja Kuehlewind <
>>> mirja.kuehlewind@ericsson.com> wrote:
>>>
>>> Hi Martin,
>>>
>>>
>>>
>>> just two quick questions because I’m not sure I fully understand the
>>> proposal/scenario:
>>>
>>>
>>>
>>> 1.      How can you guarantee that any data can be delivered reliably
>>> if the sender is indicating that it won’t retransmit?
>>>
>>> 2.      If the sender sends the reset before any stream data is ever
>>> delivered to the application, why do you still need to deliver the session
>>> id (given the stream will never be used)? Or maybe asked differently, why
>>> is the sender sending a reset at all?
>>>
>>>
>>>
>>> Mirja
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From: *QUIC <quic-bounces@ietf.org> on behalf of Marten Seemann <
>>> martenseemann@gmail.com>
>>> *Date: *Friday, 9. September 2022 at 10:35
>>> *To: *QUIC WG <quic@ietf.org>
>>> *Subject: *new draft: RELIABLE_RESET_STREAM
>>>
>>>
>>>
>>> In RFC 9000 we defined a RESET_STREAM frame. When a stream is reset, the
>>> receiver may deliver the reset error to the application immediately. On the
>>> sender side, lost STREAM frames won't be retransmitted.
>>>
>>> When building applications on top of QUIC, it is a common pattern to
>>> send some kind of identifier (an ID or a string, for example) first, to
>>> allow the application to route the stream to a subpart of that application.
>>> For example, WebTransport sends the Session ID of the WebTransport Session.
>>> Outside of the IETF, I've used something similar for layering various
>>> applications on top of QUIC.
>>>
>>>
>>>
>>> When a stream is reset, the receiver might end up unable to associate
>>> the stream with the respective subpart of the application. This is
>>> problematic, since
>>>
>>> 1.       depending on the application protocol, a reset of a stream
>>> might carry application-layer semantics, and
>>>
>>> 2.       the RESET_STREAM only closes one side of the stream, and it
>>> might depend on the (sub-) application how the other direction of the
>>> stream is handled
>>>
>>> This problem is not unique to WebTransport, but occurs for every
>>> application using some kind of stream identifier. It might make sense to
>>> design a solution at the QUIC layer.
>>>
>>>
>>>
>>> I've just submitted a draft that aims to solve this problem:
>>> https://datatracker.ietf.org/doc/draft-seemann-quic-reliable-stream-reset/
>>>
>>> It defines a RELIABLE_RESET_STREAM frame, which is essentially
>>> a RESET_STREAM frame with one additional field, the Reliable Size. The
>>> sender of the RELIALBE_RESET_STREAM frame commits to (re-)transmitting
>>> stream data up to the Reliable Size reliably, and the receiver delivers
>>> data up to that offset to the application before surfacing the reset error.
>>>
>>> In WebTransport, you'd set the Reliable Size such that it covers
>>> everything up the Session ID, thereby making sure that any stream can
>>> always be routed to its WebTransport session.
>>>
>>>
>>>
>>> Obviously, there are use cases for this draft beyond the reliable
>>> transmission of just a stream identifier. One could imagine an application
>>> protocol that would benefit from being able to have the first part of an
>>> actual application-layer message being delivered reliably. I'm happy about
>>> enabling those use cases, but I've avoided making this draft more
>>> complicated than necessary by accommodating the more general cases.
>>>
>>>
>>>
>>>

-- 
Kazuho Oku