Re: new draft: RELIABLE_RESET_STREAM

Marten Seemann <martenseemann@gmail.com> Fri, 23 September 2022 13:21 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 DA312C1522AC for <quic@ietfa.amsl.com>; Fri, 23 Sep 2022 06:21:27 -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_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=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 WoZT1V6D0gI1 for <quic@ietfa.amsl.com>; Fri, 23 Sep 2022 06:21:24 -0700 (PDT)
Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 EA5A6C1522AD for <quic@ietf.org>; Fri, 23 Sep 2022 06:21:23 -0700 (PDT)
Received: by mail-ej1-x635.google.com with SMTP id lc7so754048ejb.0 for <quic@ietf.org>; Fri, 23 Sep 2022 06:21:23 -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=VGNRPLpMZdbmFenFWCoGIjURJNQZKhy2KcGlQdm+1hI=; b=o39CaFq3xUze+rCOggJE3oCD8vTqNP0c1IYdIgpcY6LL8NCMikZtDFQs3c5aP27IyN EjAPx7p5EzfxoTXtpP0DzATczQqXJkBdqV1EGZousvHYco8G/FLH5MF3YfJaA5WCp0wC 4o3BG+nJVRHVwWHr4+wff0KGvrC9jOMMCF+pUAF53MAlCO3XgOdtBEi7snVHd9CLr+Ei 8CrWV5C1rrJmsaDrkVXWXquvKQcbiS40CWFNFWv0/pp+fU7t/wGFJVm3JNIvrFJYTX8m 4jTgVhj96hGFz8OvV4lZgbgCysYw5S03cQgX8S/8y/ckGlYjpnyp6OAnJUFFwPBlYZlQ i1tw==
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=VGNRPLpMZdbmFenFWCoGIjURJNQZKhy2KcGlQdm+1hI=; b=O1lA0JMFXngrVWHLXAA80iF9si24hXdSjlceZeCU+VH3nTMdfZB1gvyjPgWFatMvGE HPeVBdxR5s/126BOX/qzReQsEwRZtVc8u5mWUlqSiP39DtOBuysKJXOwitkps/yqWh4I lHIMad10bGRrnVd1tgIwEYeAdWJ0FCXobA/sW0tYPiXEqXWrm3T1z4hS8lYAJ2m47C/9 Vgr/tX1iU1yIgqVRHJFvcsqYffnLBV+8mAm2p7o02ZIIIRk/uSMSiGyoqdO153TOHQmh l2tl+HcqxmJdni6mVsjAoi4J4cifc8iau6mMKFXhaFGZoZxzhCEX0PO/DMeEg42+Phop 9pUQ==
X-Gm-Message-State: ACrzQf2lsSK8UFZ9Jw87aeLUiFDBEvNqW82fy4CWy3uKA1sGcCdfbRat LAvA6qWZB+kkwbKbUL2C3wu899DtwwD5yCWKvhU=
X-Google-Smtp-Source: AMsMyM6/pNAbMNw5ZljVXsiV/Pr2S2GvAY6wXYGBlPXu4AGl3PwzbZnE8KGvjSa7vtpQbVqVWVH8BAI7Ml9O0ZxtWkU=
X-Received: by 2002:a17:907:3faa:b0:780:1b17:67ea with SMTP id hr42-20020a1709073faa00b007801b1767eamr7092986ejc.464.1663939282125; Fri, 23 Sep 2022 06:21:22 -0700 (PDT)
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>
In-Reply-To: <565C27F0-513C-4F99-BCD3-593AAAEFD49A@ericsson.com>
From: Marten Seemann <martenseemann@gmail.com>
Date: Fri, 23 Sep 2022 16:21:10 +0300
Message-ID: <CAOYVs2qJU9okQQ2QdkGrZoKEB4RG9ta2_003rdOh8m8mN9LXyA@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="000000000000d6c85e05e9580de0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/H-QO9KYc74K2V2NQC-DQgZTqI3Y>
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 13:21:27 -0000

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