Re: Proposal: a new WRAP UP capsule

Dustin Mitchell <djmitche@google.com> Tue, 09 July 2024 17:50 UTC

Received: by ietfa.amsl.com (Postfix) id BFC52C151072; Tue, 9 Jul 2024 10:50:20 -0700 (PDT)
Delivered-To: ietfarch-httpbisa-archive-bis2juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BEE50C14F68F for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 9 Jul 2024 10:50:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.156
X-Spam-Level:
X-Spam-Status: No, score=-2.156 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, TRACKER_ID=0.1, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLACK=0.5, 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=w3.org header.b="DmmqXhez"; dkim=fail (2048-bit key) reason="fail (body has been altered)" header.d=w3.org header.b="jluUD6Jm"; dkim=fail (2048-bit key) reason="fail (body has been altered)" header.d=google.com header.b="QAOaA6jj"
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 75OC72HILukK for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 9 Jul 2024 10:50:16 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C5515C14F609 for <httpbisa-archive-bis2Juki@ietf.org>; Tue, 9 Jul 2024 10:50:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:Cc:To:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=D5EhK60UcCHZSBcesMe/uxHccabfnPprw9OfkMvdGtY=; b=DmmqXhezuR3AsO+qzxieMtus5R kBXgjunZjoLT1S9WRNyhqpLQH0eYKs0AYoWq2jyf1DZRz6YnArj6OHPe2ABtzLLd7rNh8WDQQaX5+ jDINrLuqVs9WnmWC6x2ZewoKfOKH82iu6KJylrwkbRvfgSLl4SBBqtv+ZKsTMZkxYVrgvt1VYasJT 4XXNFGASsQj+zDPCaooyuGPpsibBcJ8qnAnxhRMv43za16NZl98E5ceohy+70h0BohG+owe9Zhp/c +h3V6GfSRqlFVlF0dwV1wx/g8MNRwRn0ojOOkpeBIyTo585GZhcQWARSR+K3JphWHyXcwlfyBETS/ 7QyTucVQ==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1sREy3-00DspR-23 for ietf-http-wg-dist@listhub.w3.org; Tue, 09 Jul 2024 17:49:31 +0000
Resent-Date: Tue, 09 Jul 2024 17:49:31 +0000
Resent-Message-Id: <E1sREy3-00DspR-23@mab.w3.org>
Received: from www-data by mab.w3.org with local (Exim 4.96) (envelope-from <djmitche@google.com>) id 1sREy1-00Dsod-28 for ietf-http-wg@listhub.w3.internal; Tue, 09 Jul 2024 17:49:29 +0000
Received: from ip-10-0-0-224.ec2.internal ([10.0.0.224] helo=puck.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <djmitche@google.com>) id 1sREx9-00DroW-0m for ietf-http-wg@listhub.w3.internal; Tue, 09 Jul 2024 17:48:35 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=N053UV0ulM4eP1Zb4qu2mrhkgLRlyTeM8n9I2FzIokY=; t=1720547315; x=1721411315; b=jluUD6JmTcIZTXs/Dzq4I1jQbq0YCrKcLBjkIkysJPlGXvDQjyBQ2H4J6A0u79ELeoPkmt0YAnu yK1Ts/0cd2t4Tbe9696dAOAFf87ClWgytokmHreDPCMJOSjSIzAeq6RqZ6tlNLH2/y9u/fkwuZgTI wPPUQzQRzIFD7S7vfxc7umliZTo/D0wOUuG5V0IQXJNuYzR7rHIQGpE7BPqH3CLd9PextWRz8yKOu shqBwY78OR4nfbGL/AcaJ+xsMP+w/aqe6Urk+Ci4fAvCtlWKpTgKyNPKEVlW1D76FL4Tdd0VA9lAZ QL9T9CtMTq7YcpWTeebnvdh6KbTDpIu9tN7A==;
Received-SPF: pass (puck.w3.org: domain of google.com designates 2607:f8b0:4864:20::62d as permitted sender) client-ip=2607:f8b0:4864:20::62d; envelope-from=djmitche@google.com; helo=mail-pl1-x62d.google.com;
Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by puck.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <djmitche@google.com>) id 1sREx8-00GS5m-0h for ietf-http-wg@w3.org; Tue, 09 Jul 2024 17:48:35 +0000
Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1fb10519ae3so13565ad.1 for <ietf-http-wg@w3.org>; Tue, 09 Jul 2024 10:48:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1720547310; x=1721152110; darn=w3.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=N053UV0ulM4eP1Zb4qu2mrhkgLRlyTeM8n9I2FzIokY=; b=QAOaA6jjzPyEs6qFRUdHQahGAHKNIOWF5QkQgnsHjOZ1JPVnMQWl5zOlWGInQ4PuJ2 bJwaILsxSVmrptXrHKImiLnxAXPgWwITezOXotl25fuKqRJZvM6UOVreqmdyqq6eMLeM +IEmlMoVAdbnrdDZS32ifFK0Y+iS04NrDmkILve/OPTnNwwx6VTHyd7efLguhXNcVsk/ OD77kXhsgL9LHYK4+pZlIvoGTkKRuRA1KOgCLR4bGMUerL0wh/2uzLvaSHWum9l+5CsG YTKettzn8DfR85eosZWb/QzIuXECW9Zsmh9V/EN9ewTwL/s1J++U9dhZhilfKvWGy1AX DxPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720547310; x=1721152110; 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=N053UV0ulM4eP1Zb4qu2mrhkgLRlyTeM8n9I2FzIokY=; b=fgbgRQjG6rnAKwlNdDuohnkQUiBi6aubt0/LSMIGb5A2DS5SngmBxm61QT+764mz2e GdOhhCaImtA4vYZdVO0Z4fg4DYvaSYIwWVetv5BKCQqp9HMQniykAKorY6c/XmuovDmj D3ELLmPEwjp9Y7YCd+tL+W2lxXfiRbH6hZ7x8bN5z7a3fpvv9OPl0WvF0D+nCZP7OC5b c7Gy4wrcY2PwiCJrvTMeAHqG1eAG8IWHJRMUs6H2+HyQjOnjg4ChQJ4gxCoM1mjTEaAa Mhx9jpUM9lBxd0jyI3tHkZnEbVKWpdVJPiv1Duo85eNOMjV2KMwH2A3CPmRBlRslOfXX N5IA==
X-Forwarded-Encrypted: i=1; AJvYcCW8+Y7T8uewSzQJcl4nHfy9p3cfMFGLlV8P9mtwlHCoTDDqA1kiQOk5zyRLaKT4jmFDGAVd/wJG3wbuzvDIGH3g2Ph2
X-Gm-Message-State: AOJu0YwKQusC1GT/0V/rWngOli63u/UIoZb3NQYQVKmmBXFY7XxJ9NR+ ZD8tN4X7GqMmJyG2xFB1Szaw7hO2WvCC3ROcP6+FrPevl39m+O7l/h880UBDYmfjEaaGO4s2XxK h24wSARd+8/rtpkxKcnUfvIkozHRP057MtIkC
X-Google-Smtp-Source: AGHT+IEaG2XERsvjurMnCEJgR6m5BJnsj9SJqbnJ0fo4e5YDpWnntjIMcrk5hPy4AR327vvvJs10oXzxePNyZZNG0ck=
X-Received: by 2002:a17:902:8d98:b0:1f8:80e1:8dcc with SMTP id d9443c01a7336-1fbcb159796mr35745ad.7.1720547309908; Tue, 09 Jul 2024 10:48:29 -0700 (PDT)
MIME-Version: 1.0
References: <CAPDSy+5UU=GSFWTdrkHW7RXNL8pr5KWtLfp8zjExsZvvGczfEw@mail.gmail.com> <SA1PR15MB4370BBF870827575AA1C05A8B3DF2@SA1PR15MB4370.namprd15.prod.outlook.com> <8ada24df-9941-4a37-b79b-8ef471c5459d@app.fastmail.com>
In-Reply-To: <8ada24df-9941-4a37-b79b-8ef471c5459d@app.fastmail.com>
From: Dustin Mitchell <djmitche@google.com>
Date: Tue, 09 Jul 2024 13:48:16 -0400
Message-ID: <CALMtyTRYXp796P1AkpfEOF-VW-sW9xChuxFV7RpB=xu6Ky6xSQ@mail.gmail.com>
To: Lucas Pardue <lucas@lucaspardue.com>
Cc: Ben Schwartz <bemasc@meta.com>, David Schinazi <dschinazi.ietf@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000003a6438061cd42325"
X-W3C-Hub-DKIM-Status: validation passed: (address=djmitche@google.com domain=google.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-18.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, DMARC_PASS=-0.001, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TRACKER_ID=0.1, URIBL_BLACK=1.7, URIBL_DBL_BLOCKED_OPENDNS=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: puck.w3.org 1sREx8-00GS5m-0h 97896d845f62f311b4ff92de6deb8545
X-caa-id: 12b5d455e8
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Proposal: a new WRAP UP capsule
Archived-At: <https://www.w3.org/mid/CALMtyTRYXp796P1AkpfEOF-VW-sW9xChuxFV7RpB=xu6Ky6xSQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/52061
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

>
> 2. Should this be a stream-scoped HTTP/2+3 frame type?  There are lots of
> cases of streaming requests and responses that might encounter some kind of
> limit in HTTP, including WebSocket, WebTransport, and even plain old POST
> and GET.  Should "this stream is getting too long for me" be a built-in
> function of HTTP?
>
> I'm not sure. I think it depends on the direction of nessage travel and
> what the limit applies to.
>
> One example we have is in resumable uploads, where we've defined an
> upload-limit header [1] that applies to resources, not streams. An upload
> can span multiple requests, and we indicate the limits of individual
> requests and aggregate size
>
> What single transaction cases would a frame help? For a large download,
> telling the client to wrap up isn't much good because it cant do anything,
> you could just reset the stream.
>

This seems not especially useful for requests and responses. A POST
request, for example, should fail if the server is unwilling to receive the
full-size body. It would be unusual for a client to be able to "wrap up"
mid-body. For more sophisticated uploads, the indicated other mechanisms to
adjust request size suffice.


> WebSocket is a bidi pipe and similar to MASQUE flows., I could see wrap up
> applying there. The capsule seems like it would work too.
>

This seems the class of usage that needs a "WRAP UP" -- a bidirectional
pipe that could otherwise continue indefinitely, can have traffic in-flight
at any time, and can be re-established without much trouble. Aside from the
use-case David described, "WRAP UP" might apply for websocket servers that
wish to shed idle or old connections without losing in-flight data. So
there's a use-case for this outside of proxies.

Capsule currently does not have any signalling characteristics. If we add
this one, will we be tempted to add more?

Dustin


> [1]
> https://httpwg.org/http-extensions/draft-ietf-httpbis-resumable-upload.html#section-8.2
>
> --Ben
>
> ------------------------------
>
> *From:* David Schinazi <dschinazi.ietf@gmail.com>
> *Sent:* Friday, July 5, 2024 6:29 PM
> *To:* HTTP Working Group <ietf-http-wg@w3.org>
> *Subject:* Proposal: a new WRAP UP capsule
>
> Hi HTTP enthusiasts, Over in MASQUE land, as we're deploying our two-hop
> proxies, we decided we needed to put a cap on how many bytes we'd allow per
> token-authenticated connect-udp tunnel. Enforcing a hard limit is easy, but
> the issue
> ZjQcmQRYFpfptBannerStart
> This Message Is From an External Sender
>
>
> ZjQcmQRYFpfptBannerEnd
> Hi HTTP enthusiasts,
>
> Over in MASQUE land, as we're deploying our two-hop proxies, we decided we
> needed to put a cap on how many bytes we'd allow per token-authenticated
> connect-udp tunnel. Enforcing a hard limit is easy, but the issue is that
> if the proxy aborts the tunnel halfway through, the web browser could be
> halfway through a proxied request. Since the browser doesn't know if the
> half-finished request was acted on or not, it can't retry it, so it has to
> surface the error to the user. Instead, we want the proxy to be able to
> warn the browser that this will happen soon, so that the browser can
> establish a new tunnel with a new token, and start sending new requests
> there. Conceptually this is a little like GOAWAY, but instead of "please
> wrap up this connection", it's "please wrap up this tunnel stream". It uses
> capsules, since this is a message from proxy to client. Here's a draft with
> diagrams:
>
> https://datatracker.ietf.org/doc/draft-schinazi-httpbis-wrap-up/
>
> https://davidschinazi.github.io/draft-schinazi-httpbis-wrap-up/draft-schinazi-httpbis-wrap-up.html
>
> I'd love to hear your thoughts.
>
> Thanks,
> David
>
>
>