Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websockets over HTTP/2 #417

Open
riking opened this issue Aug 26, 2018 · 10 comments
Open

Websockets over HTTP/2 #417

riking opened this issue Aug 26, 2018 · 10 comments

Comments

@riking
Copy link

riking commented Aug 26, 2018

Is gorilla/websocket going to be doing an experimental implementation of the Websockets+h2 draft, or waiting for it to go RFC?

https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-07

@elithrar
Copy link
Contributor

elithrar commented Aug 26, 2018 via email

@garyburd
Copy link
Contributor

garyburd commented Aug 26, 2018

I prefer to let the browsers lead on protocol features. Do you know where browsers are with the proposal?

If it looks like one or more browsers will implement the RFC, then the implementation should be sketched out in case changes are needed to the net/http or golang.org/x/net/http2 packages.

I don't know of any plans to do this work.

@riking
Copy link
Author

riking commented Aug 27, 2018

Yes, I was alerted to this via the blink-dev Intent To Ship where they say Mozilla also intends to implement it.

Intent to Implement: https://groups.google.com/a/chromium.org/d/topic/blink-dev/TQN4jWHydTk/discussion
Intent to Ship: https://groups.google.com/a/chromium.org/d/topic/blink-dev/7MCjXU3zmCQ/discussion
Chrome tracking bug: https://crbug.com/801564
Firefox tracking bug: (not very active, but Intent to Ship thread contains verbal confirmation that Mozilla is working on it) https://bugzilla.mozilla.org/show_bug.cgi?id=1434137

This probably isn't shipping before the end of the year, no.

@nhooyr
Copy link

nhooyr commented Sep 6, 2018

This would require support from net/http for the CONNECT method protocol extension.

@nhooyr
Copy link

nhooyr commented Aug 21, 2019

Some discussion also at nhooyr/websocket#4

@lxzan
Copy link

lxzan commented Aug 10, 2023

It's still TCP at the bottom, so there's no real point.

@nhooyr
Copy link

nhooyr commented Sep 28, 2023

It's still TCP at the bottom, so there's no real point.

It's useful for the same reason it's useful for normal HTTP requests, built in pipelining. Means you can use a single TCP connection with multiple websockets instead of having to implement your own pipelining protocol over websockets.

Certainly not a game changer but a nice addition nonetheless.

@lxzan
Copy link

lxzan commented Sep 28, 2023

It's useful for the same reason it's useful for normal HTTP requests, built in pipelining. Means you can use a single TCP connection with multiple websockets instead of having to implement your own pipelining protocol over websockets.

Certainly not a game changer but a nice addition nonetheless.

It seems to reduce performance. Does the browser client support this?

TCP Stream => H2 Stream => WebSocket Frame

@nhooyr
Copy link

nhooyr commented Sep 28, 2023

It seems to reduce performance. Does the browser client support this?

Depends on the use case.

Does the browser client support this?

Yes, browsers do support WebSockets over HTTP/2.

@meneses-matheus
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

7 participants