Intent to ship: WebSockets over HTTP/2

778 views
Skip to first unread message

Bence Béky

unread,
Jul 30, 2018, 2:15:03 PM7/30/18
to blink-dev
To: blin...@chromium.org (this is part of the Blink launch process).
Bcc: net...@chromium.org as FYI.

Contact emails
b...@chromium.org

Spec
https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-07,
currently in RFC editor's queue.

Design doc
https://docs.google.com/document/d/1ZxaHz4j2BDMa1aI5CQHMjtFI3UxGT459pjYv4To9rFY

Summary
Implement support for secure WebSockets over an already established
HTTP/2 connection.

Motivation
A large proportion of web servers support HTTP/2. Currently if a
WebSocket is requested to such a server, a new HTTP/1.1 connection
must be established even if there is an active HTTP/2 connection,
because WebSocket handshake is only supported over HTTP/1.1. However,
if both the server and the client support WebSockets over HTTP/2, and
the connection is already open, and the server has advertised support
as described in the specification, and the request is for a secure
WebSocket, then the client can open a new stream on the existing
HTTP/2 connection, thereby saving the roundtrip times associated with
the TCP and TLS handshake.

Interoperability and Compatibility Risk
A Firefox network stack engineer is driving the specification
singlehandedly, which is a strong indicator to their commitment to
implement this feature. The specification has been positively
received by the wider IETF community and is now in the editor's queue.

The feature requires explicit advertisement of support from the
server. Chromium's behavior does not change until it receives this
setting, therefore the interoperability risk with servers and reverse
proxies is low. The feature is tied to HTTP/2 which is only supported
over TLS in Chromium, therefore the interoperability risk with proxies
that do not terminate the TLS connection is low. UMA metrics show
that WebSockets over HTTP/2 usage is less than 1e-8 of all WebSockets
handshakes, therefore interoperability risk is extremely low overall.
Because of this, I propose to simple enable this feature on tip of the
tree and let it be released via Chrome's usual release channels (with
a field trial parameter in place that would allow it to be disabled).

Activation
This feature will be used with compatible servers without the need for
activation from web developers, as long as the WebSocket request is
secure (wss scheme as opposed to ws).

Will this feature be supported on all six Blink platforms (Windows,
Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes. This feature will be implemented in the Chromium network stack,
therefore it will be supported on all platform where such network
stack is used and enable_websockets build flag is true.

Link to entry on the feature dashboard
https://www.chromestatus.com/feature/6251293127475200

Link to intent to implement thread
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/TQN4jWHydTk

Requesting approval to ship?
Yes.

Yoav Weiss

unread,
Aug 7, 2018, 7:18:31 AM8/7/18
to Bence Béky, blink-dev
I agree that Patrick working on the spec is a positive indicator, but are there any public signals from Mozilla beyond that? What about Apple and Microsoft net stack folks? Have you tried reaching out to them?

I found https://bugzilla.mozilla.org/show_bug.cgi?id=1434137 but it's not very active.
 

The feature requires explicit advertisement of support from the
server.  Chromium's behavior does not change until it receives this
setting, therefore the interoperability risk with servers and reverse
proxies is low.  The feature is tied to HTTP/2 which is only supported
over TLS in Chromium, therefore the interoperability risk with proxies
that do not terminate the TLS connection is low.  UMA metrics show
that WebSockets over HTTP/2 usage is less than 1e-8 of all WebSockets
handshakes, therefore interoperability risk is extremely low overall.
Because of this, I propose to simple enable this feature on tip of the
tree and let it be released via Chrome's usual release channels (with
a field trial parameter in place that would allow it to be disabled).

Any "customers" willing to experiment with the new protocol addition and provide feedback?
 

Activation
This feature will be used with compatible servers without the need for
activation from web developers, as long as the WebSocket request is
secure (wss scheme as opposed to ws).

Will this feature be supported on all six Blink platforms (Windows,
Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.  This feature will be implemented in the Chromium network stack,
therefore it will be supported on all platform where such network
stack is used and enable_websockets build flag is true.

Link to entry on the feature dashboard
https://www.chromestatus.com/feature/6251293127475200

Link to intent to implement thread
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/TQN4jWHydTk

Requesting approval to ship?
Yes.

--
You received this message because you are subscribed to the Google Groups "net-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-dev+u...@chromium.org.
To post to this group, send email to net...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/net-dev/CACMu3tpxetH1690QT4kON8x_sm-h6WD39Ji3cMGirGhnerO%3DDw%40mail.gmail.com.

Bence Béky

unread,
Aug 8, 2018, 11:37:11 AM8/8/18
to Yoav Weiss, blink-dev
Hi Yoav,

As for "customers", that is, servers, https://libwebsockets.org/ is a
free library with WebSockets over HTTP/2 support that works with
Chrome. I'm also aware of one large cloud company with a server
product that works with Chrome, they intend to launch it to their
customers in the near future.

Regarding other browsers, I'm reaching out to them and I'll get back
to you when I hear back.

Thanks,

Bence

Yoav Weiss

unread,
Aug 16, 2018, 6:20:47 AM8/16/18
to Bence Béky, blink-dev
On Wed, Aug 8, 2018 at 5:37 PM Bence Béky <b...@chromium.org> wrote:
Hi Yoav,

As for "customers", that is, servers, https://libwebsockets.org/ is a
free library with WebSockets over HTTP/2 support that works with
Chrome.  I'm also aware of one large cloud company with a server
product that works with Chrome, they intend to launch it to their
customers in the near future.

Great to hear there's developer interest.
 

Regarding other browsers, I'm reaching out to them and I'll get back
to you when I hear back.

Did you hear anything back from other vendors? I think it's fine to be first-movers here, assuming others will eventually follow.

Bence Béky

unread,
Aug 16, 2018, 10:56:35 AM8/16/18
to Yoav Weiss, blink-dev
Hi Yoav,

Folks from Mozilla report that they are actively working on it. I'm
still working on finding the best contacts for Apple and Microsoft, I
hope I can report back soon.

Bence

Yoav Weiss

unread,
Aug 16, 2018, 11:01:08 AM8/16/18
to Bence Béky, blink-dev
On Thu, Aug 16, 2018 at 4:56 PM Bence Béky <b...@chromium.org> wrote:
Hi Yoav,

Folks from Mozilla report that they are actively working on it.  I'm
still working on finding the best contacts for Apple and Microsoft, I
hope I can report back soon.

Thanks! :)

 LGTM1, since Mozilla are actively on it. (Would be great to know about the other vendors, but shouldn't block this intent)

Philip Jägenstedt

unread,
Aug 21, 2018, 12:08:16 PM8/21/18
to Yoav Weiss, Bence Béky, blink-dev
Hi Bence,

What is the situation with shared tests in wpt for this? Are there internal tests for this which could be shared?

Support for HTTP/2 in web-platform-tests was recently added in https://github.com/web-platform-tests/wpt/pull/11806 and a few other PRs. Would that be enough to also test WebSockets over HTTP/2?

You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACj%3DBEgGiC%2BwTa%2BOO%3DaipgdahccPkRL-xy_8iKHH1-Ozdat1zg%40mail.gmail.com.

Bence Béky

unread,
Aug 27, 2018, 9:04:13 AM8/27/18
to Philip Jägenstedt, Yoav Weiss, blink-dev
Hi,

Yoav: I heard back from Microsoft and Apple. No public signals from either.

Philip: I'm glad to hear HTTP/2 support coming to WPT. Yes, if there
is support for arbitrary SETTINGS sent by the server, and for making
sure the browser receives those before making a request, and for
arbitrary headers, then it should be enough to test WebSockets.

Bence

Rick Byers

unread,
Aug 28, 2018, 3:18:30 PM8/28/18
to Bence Béky, Chris Harrelson, Yoav Weiss, Philip Jägenstedt, blink-dev
Yoav, Chris, and discussed this in the API owners meeting today. 

Note that the current intent to ship template has a "Is this feature fully tested by web-platform-tests?" section which says (among other things):
An Intent to Ship requires either a web platform test suite or such issues to be filed explaining why such a test suite is currently impossible or in the process of being upstreamed.
 
LGTM2 once this condition has been met.

Chris Harrelson

unread,
Aug 28, 2018, 6:20:10 PM8/28/18
to Rick Byers, Bence Béky, Yoav Weiss, Philip Jägenstedt, blink-dev
LGTM3 with same condition as Rick mentioned.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY9Lq%3Dr6fLSTSB3G-jDfyDkaRMt-cCQ5dxAnkNyvs37ALw%40mail.gmail.com.

Philip Jägenstedt

unread,
Aug 30, 2018, 5:49:24 AM8/30/18
to Chris Harrelson, Rick Byers, Bence Béky, Yoav Weiss, blink-dev
In this case, what I believe would be appropriate is discussing with @dhdavvie on GitHub how the HTTP/2 support for wptserve could be extended for the WebSockets server in WPT. There is a SettingsFrame class at least and its constructor seems to allow specifying entirely custom settings. How much plumbing would be required to make it all fit together I don't know.

Adam Rice

unread,
Mar 22, 2021, 2:09:53 AM3/22/21
to Philip Jägenstedt, Chris Harrelson, Rick Byers, Bence Béky, Yoav Weiss, blink-dev
Thanks to Arnaud Renevier from Facebook, the web platform tests for H2 are now available. See the tests marked ?wpt_flags=h2 at https://wpt.fyi/results/websockets. So I'm going to proceed with shipping. I realise it's unusual to ship 2.5 years after getting the LGTMs (maybe a record?) but hopefully that won't be a problem.

Chris Harrelson

unread,
Mar 22, 2021, 11:55:02 AM3/22/21
to Adam Rice, Philip Jägenstedt, Rick Byers, Bence Béky, Yoav Weiss, blink-dev
Hi Adam,

Since it's been so long, can you update the thread with the latest compatibility / support information from Gecko and Webkit? Has anything changed in the last two years?

Adam Rice

unread,
Mar 22, 2021, 12:56:55 PM3/22/21
to Chris Harrelson, Philip Jägenstedt, Rick Byers, Bence Béky, Yoav Weiss, blink-dev
Firefox have shipped it. Safari still doesn't support it. I've also updated the chrome platform status entry.

Chris Harrelson

unread,
Mar 22, 2021, 3:45:02 PM3/22/21
to Adam Rice, Philip Jägenstedt, Rick Byers, Bence Béky, Yoav Weiss, blink-dev
Ok thanks. You're good to go from my perspective.

Reply all
Reply to author
Forward
0 new messages