Re: New Version Notification for draft-momoka-httpbis-settings-enable-websockets-00.txt

Lucas Pardue <lucaspardue.24.7@gmail.com> Wed, 18 January 2023 17:15 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
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 6EC9CC15152C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 18 Jan 2023 09:15:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.748
X-Spam-Level:
X-Spam-Status: No, score=-7.748 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=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 JEhnIrOEaj7n for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 18 Jan 2023 09:15:29 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 5794CC14F738 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 18 Jan 2023 09:15:29 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1pIC1d-001LAM-Rf for ietf-http-wg-dist@listhub.w3.org; Wed, 18 Jan 2023 17:15:01 +0000
Resent-Date: Wed, 18 Jan 2023 17:15:01 +0000
Resent-Message-Id: <E1pIC1d-001LAM-Rf@lyra.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <lucaspardue.24.7@gmail.com>) id 1pIC1b-001L91-Sc for ietf-http-wg@listhub.w3.org; Wed, 18 Jan 2023 17:14:59 +0000
Received: from mail-oa1-x36.google.com ([2001:4860:4864:20::36]) by mimas.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from <lucaspardue.24.7@gmail.com>) id 1pIC1a-00BmaI-4I for ietf-http-wg@w3.org; Wed, 18 Jan 2023 17:14:59 +0000
Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-1433ef3b61fso36150504fac.10 for <ietf-http-wg@w3.org>; Wed, 18 Jan 2023 09:14:57 -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=DxdcVOO3HJ26y8Ux4tdNhOjFEt3VvMGzgnamJrtFNSA=; b=A9jNd0ogMmKRIRDpBFCvxTdL2lJv2bJ+9TMer9gY0T5eOjL16eyQXKlI8h2qztLkEq UBjgenMhT4uhkNwU044DYw4nT9HJDeUF1QXdTBM5ybO6mxRNLb3ztBUylbVJ+Fnb74pO Ck/us2Etc6dTcguu/7LWj1IbEK+yJOo4SsUOBEGr5rcYj49JmFgre718hPXR8UAc5Uxp QuDGGDca9e0NZ/MYKsNKZayy2ZBJPtN1So5CS35ecFjJXLDsUpBWNTWjnxWUdGdOAbEN 9eUizE9ZCag5PPMEOlb+HIspzjYJqtLta8WtV7ruDDuTVxgPSgotyYWSoVhrplI11HdB 6jAg==
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=DxdcVOO3HJ26y8Ux4tdNhOjFEt3VvMGzgnamJrtFNSA=; b=ifuySOt4SxiLWFYpvVSYjzc9WBmIkVEboQAuvFPEY1s63pzZmU04FRT9i8WkHncDsZ 2nApTSYgUh3NSzWvq0irdG8S0SsfN4M9l5AQng51ezOEqB0w7vvyDw/md9ZUWQ7dymlK Yy7bNee70MhdHAcX4ELVaj9BuZP/Wo2LctnknEDVtN2cbvuM/ieBWvXR7CSUAaUmXcV9 nd7+ODWUzYWmMXkJnocJuo4x0XNnB6Vi34KGzHqcDquZLn+pwAfRKZGCkpC4F+DKPOZr zmItZqyba8efiPsELc4ojXbx7lZE80wZoQ72PHQ+fe6k5PZjY0GLVRk4C2iSABJff1zF wugw==
X-Gm-Message-State: AFqh2kr+JxphhmWGN2sK2Cthj/kMHQzmjdYCtJba+MJm4XurwrmEctGC wTVwHnPgVElUkI1zuhMOLdF0Mtcs5JHajkcwtNI=
X-Google-Smtp-Source: AMrXdXtrK0M/1R8IpWAADbb2DD2QanC/PznfzUbDDRHGtN2Q4xdPCfmnarXunlkDaWcFJqCoHYJc3oqiP7pBHQ3kqyo=
X-Received: by 2002:a05:6870:aa87:b0:15c:a5de:27da with SMTP id gr7-20020a056870aa8700b0015ca5de27damr651010oab.4.1674062086848; Wed, 18 Jan 2023 09:14:46 -0800 (PST)
MIME-Version: 1.0
References: <167308384752.44075.8810233925919235602@ietfa.amsl.com> <CAD9w2qbAGXsskcDO0Ogo6htiEj5qqT8+_RLVMuZ4ZNiepEid_Q@mail.gmail.com> <CAHbrMsDSFRHQhciZM6PYNL=qoWAK8N-g+Pd39NngBKxag62wpA@mail.gmail.com>
In-Reply-To: <CAHbrMsDSFRHQhciZM6PYNL=qoWAK8N-g+Pd39NngBKxag62wpA@mail.gmail.com>
From: Lucas Pardue <lucaspardue.24.7@gmail.com>
Date: Wed, 18 Jan 2023 17:14:35 +0000
Message-ID: <CALGR9oYmYid=0pMW5tCLpE1GFdz1hgTL0Vy6HDjYBSNZC1WP3A@mail.gmail.com>
To: Ben Schwartz <bemasc@google.com>
Cc: Momoka Yamamoto <momoka.my6@gmail.com>, ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="00000000000004c5c805f28cf4fe"
Received-SPF: pass client-ip=2001:4860:4864:20::36; envelope-from=lucaspardue.24.7@gmail.com; helo=mail-oa1-x36.google.com
X-W3C-Hub-DKIM-Status: validation passed: (address=lucaspardue.24.7@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1pIC1a-00BmaI-4I 92e8d13e952d34c1bbdac2900af44492
X-Original-To: ietf-http-wg@w3.org
Subject: Re: New Version Notification for draft-momoka-httpbis-settings-enable-websockets-00.txt
Archived-At: <https://www.w3.org/mid/CALGR9oYmYid=0pMW5tCLpE1GFdz1hgTL0Vy6HDjYBSNZC1WP3A@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/40684
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/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi Momoka,

Thanks for sharing your proposal. If I understand the use case, Dragana
made a proposal to address some similar problems a little while back [1]
(albeit solving the problem in a different way). Just in case you didn't
catch it the first time around, and the discussion thread for that proposal
probably has some useful background [2].

I think the value of any solution to this class of problem depends on how
much pain the decision about what connection to use causes. IHMO that
mostly comes down to a matter of latency.

For example, in one case, where a web browser has an HTTP/2 connection open
to navigate a page, which then leads to a loading a document that includes
an wss:// URL, by that time the proposed SETTINGS_ENABLE_WEBSOCKETS would
likely have been received and the browser can make an informed choice
whether to try to open a WebSocket stream or to.

However, in cases where there is no active connection, then the client is
going to have to create one and wait for the server SETTINGS before knowing
what to do. That has latency and is a gamble. Without some client-side
caching of the server support, it might be a safer gamble to just always
try HTTP/1.1.

When WebSockets over H2 was written, I might have agreed that
SETTINGS_ENABLE_CONNECT_PROTOCOL is a signal the server supports WebSockets
over H2. But now we're adding multiple :protocol values into the mix with
MASQUE and WebTransport. Just because a page loaded over my infrastructure
includes a wss::// URL, it doesn't mean my infrastructure supports it for
all HTTP versions. For instance, I might theoretically like to roll out
support for WebTransport and never roll out WebSockets.

Whether a request can be serviced is a property of the target resource. So
if I had a server that understood CONNECT but wanted to reject :protocol:
websocket, then perhaps returning a 405 Method Not Allowed would be more
appropriate than a 501.

Which gets me thinking, maybe we should be designing a way for clients to
query the :protocols supported for a target resource or a server. The
OPTIONS methods can carry the query, however, the :protocol pseudo-header
cannot be sent directly in the response, so another header might be
required - I'd write that up if there's interest. If a browser is already
making pre-flight OPTIONS requests for a WebSocket due to CORS, this
approach would seem to align with that.

Cheers
Lucas

[1] - https://datatracker.ietf.org/doc/draft-damjanovic-websockets-https-rr/
[2] - https://lists.w3.org/Archives/Public/ietf-http-wg/2021OctDec/0052.html

On Wed, Jan 18, 2023 at 4:22 PM Ben Schwartz <bemasc@google.com> wrote:

> This draft says
>
> Suppose the server supports extended CONNECT but not bootstrapping
>> WebSockets over that HTTP connection. In this case, the client sending a
>> WebSocket handshake request will result in a response of 501 (Not
>> Implemented) status code (Section 15.6.2 of [HTTP]), and the client would
>> need to fall back to trying the WebSocket handshake over HTTP/1.
>
>
> I don't think this is correct.  If the client encountered this error code,
> it would just fail the WebSocket setup attempt.
>
> In general, I don't think we should be asking clients to retry requests
> across different HTTP versions.  If you publish wss:// URIs for your
> domain, you need to support WebSocket on all the domain's HTTP versions.
>
>
> On Wed, Jan 18, 2023 at 10:45 AM Momoka Yamamoto <momoka.my6@gmail.com>
> wrote:
>
>>
>> Hello,
>>
>> I have submitted an internet-draft proposing a SETTINGS_ENABLE_WEBSOCKETS
>> settings parameter.
>> With WebSockets not being the only protocol that uses extended CONNECT (
>> https://github.com/ietf-wg-webtrans/draft-ietf-webtrans-http3/issues/68#issuecomment-1310323592
>> ),
>> Before starting the WebSocket handshake, it will be nice to know if the
>> server supports bootstrapping WebSockets over HTTP/2 or HTTP/3.
>>
>> I would love to know your thoughts
>>
>> Momoka Y
>>
>> ---------- Forwarded message ---------
>> From: <internet-drafts@ietf.org>
>> Date: Sat, Jan 7, 2023 at 6:30 PM
>> Subject: New Version Notification for
>> draft-momoka-httpbis-settings-enable-websockets-00.txt
>> To: Momoka Yamamoto <momoka.my6@gmail.com>
>>
>>
>>
>> A new version of I-D,
>> draft-momoka-httpbis-settings-enable-websockets-00.txt
>> has been successfully submitted by Momoka Yamamoto and posted to the
>> IETF repository.
>>
>> Name:           draft-momoka-httpbis-settings-enable-websockets
>> Revision:       00
>> Title:          SETTINGS_ENABLE_WEBSOCKETS settings parameter for HTTP/2
>> and HTTP/3
>> Document date:  2023-01-07
>> Group:          Individual Submission
>> Pages:          5
>> URL:
>> https://www.ietf.org/archive/id/draft-momoka-httpbis-settings-enable-websockets-00.txt
>> Status:
>> https://datatracker.ietf.org/doc/draft-momoka-httpbis-settings-enable-websockets/
>> Html:
>> https://www.ietf.org/archive/id/draft-momoka-httpbis-settings-enable-websockets-00.html
>> Htmlized:
>> https://datatracker.ietf.org/doc/html/draft-momoka-httpbis-settings-enable-websockets
>>
>>
>> Abstract:
>>    This document proposes a new HTTP settings parameter,
>>    SETTINGS_ENABLE_WEBSOCKETS.  This parameter indicates whether the
>>    server supports bootstrapping WebSockets over the established
>>    connection.
>>
>>
>>
>>
>> The IETF Secretariat
>>
>>
>>