Re: new draft: RELIABLE_RESET_STREAM

Marten Seemann <martenseemann@gmail.com> Fri, 23 September 2022 10:24 UTC

Return-Path: <martenseemann@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 A8545C14F746 for <quic@ietfa.amsl.com>; Fri, 23 Sep 2022 03:24:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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 uJ1k2H50f_G5 for <quic@ietfa.amsl.com>; Fri, 23 Sep 2022 03:24:14 -0700 (PDT)
Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (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 C176AC14F739 for <quic@ietf.org>; Fri, 23 Sep 2022 03:24:14 -0700 (PDT)
Received: by mail-ed1-x534.google.com with SMTP id z2so17415217edi.1 for <quic@ietf.org>; Fri, 23 Sep 2022 03:24:14 -0700 (PDT)
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; bh=E6C7bw/o/mHwEo86urWqSqlGiXx1EHOXQWv15NMhtEU=; b=dpj+anA2s5seEBC0y4CA2p3INVowUVwSC4SreUeWpm+ys+hlW4auUqAkiiALM+8Bzl SWyQCS3TVM8f+rJguJG5to8tKnXIKGfCXHsYrtX3OgibEBLTnwcd3ksfcnsyl99M+t1Z Y/snZ/h/lzzpxTWTEbSXJA7lTgxf+46qZKWPgw2Wrbeb4cbIzslRJy4oyG7/8rm1cLs2 XQLWwuYsaJJHfXNORdbKDr+0SD2pNfMODfms8rjrdvLSpaNKR8SMgRAupWQrJYIEJh5E /72kFSTFSlDW88GI1cv3fKkHhONcCKMAjHjZfeqPGUEw5mo6AzDYkZJxyFNKbz9Ppc0B lQWQ==
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; bh=E6C7bw/o/mHwEo86urWqSqlGiXx1EHOXQWv15NMhtEU=; b=62dwef+uYCpkdHq7WA+oa+fp15o8hAUrF8SEMxgtc3ScwlVYPiOcSFi3OwW3sW55Hj gFsCgMKgC44hJKj4a0FRBEZYA+mZgtWJAgbTdpc7bIOm6fMr/hRKiIFhEFjyF8sv2RCT LAujpaLGQ1tdzZo7lo/s2Hn5zu1EaKJwic4yQi+mThdsOaO7u0sMWAYy6mzBN0rFoyiL atCxJCTVmErPL05C4LJWEXJngdsN6vW1+qEh59cd53ud2op+ehzbO4fC3ZV5z4W3uyTa Kv6kGuy+wjYhGC/AKSR7Ie14oTeAbUJLUZEILWsjkKQsFIqRiFzxlqdXi6XTk+Yk46XN Hv+w==
X-Gm-Message-State: ACrzQf2Fdo5awSZuqznSebCoYr3vZGwOwOUZg2lbokXSV75Udu8yqLxy ZlZGCcrtfpfPqnMclp1mE6Khqe6OxAxnOtXvObH2CAtDBiLePVr9
X-Google-Smtp-Source: AMsMyM6INoCYGKbvQZAMY4adQBUA9sKOOpJWA6Ucu53XtZwwu2T8/aKGHGs0mNANBmXq2hS+/Vi9+vWkYzlryr/QkzM=
X-Received: by 2002:a50:9e8f:0:b0:453:d22d:f1d1 with SMTP id a15-20020a509e8f000000b00453d22df1d1mr7689497edf.31.1663928652876; Fri, 23 Sep 2022 03:24:12 -0700 (PDT)
MIME-Version: 1.0
References: <CAOYVs2rQWUbd02jz7ywDi1xcx30wD1PSf-GRi3ZrPmGnXouy2A@mail.gmail.com> <CE1479D5-4B98-4B37-999A-E60B580E7F2E@ericsson.com>
In-Reply-To: <CE1479D5-4B98-4B37-999A-E60B580E7F2E@ericsson.com>
From: Marten Seemann <martenseemann@gmail.com>
Date: Fri, 23 Sep 2022 13:24:01 +0300
Message-ID: <CAOYVs2oeyS3eUgU+e_7QRukitD1Jga0hXCfbKRARTLU03WT4zg@mail.gmail.com>
Subject: Re: new draft: RELIABLE_RESET_STREAM
To: Mirja Kuehlewind <mirja.kuehlewind@ericsson.com>
Cc: QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000004954c105e9559403"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/9QotLdu_1UsurBscyfK90__4lLQ>
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: Fri, 23 Sep 2022 10:24:15 -0000

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.

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.
>
>
>