Integrating uWebSockets with HTTP2 #1629
Unanswered
Bolderaysky
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm using uWebSockets in my project for some time as HTTP/WebSocket server and I want to integrate that with nghttp2. I want this, because that would allow to use
HTTP2
as main protocol for talking with browser clients instead ofHTTP1.1
andWebSockets
for 2-way communication with embedded devices.After some research, I found that there's a problem that needs to be solved for that: Clients need to choose which protocol to use,
HTTP2
orHTTP1.1
. As far as I see, there's several ways to achieve that:Alt-Svc
header inHTTP1.1
from uWebSockets. This actually isn't best solution, because even if client supportsHTTP2
, it may decide to not upgrade, and at least initial request will be done onHTTP1.1
. Also, most likely would be needed to set upnghttp2
to listen on different portALPN
. This is already used inHTTP2
, but I don't really know how uWebSockets handle this and is this needed at all inHTTP1.1
WebSocket is upgraded from
HTTP1.1
, so it wouldn't be possible to getting rid of that at all.Mostly, this is question about how it may be done in terms of uWebSockets. Any ideas/info?
Beta Was this translation helpful? Give feedback.
All reactions