node-http2 | An HTTP/2 client and server implementation for node.js | Runtime Evironment library
kandi X-RAY | node-http2 Summary
kandi X-RAY | node-http2 Summary
An HTTP/2 ([RFC 7540] client and server implementation for node.js. NOTE WELL This package is officially deprecated. As of node 9.0.0, there is an http2 package built-in. You should use that one instead.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of node-http2
node-http2 Key Features
node-http2 Examples and Code Snippets
Community Discussions
Trending Discussions on node-http2
QUESTION
After having developed my application in an unsecured context using HTTP 1.1, I have now deployed it to a HTTP 2 server using HTTPS. All fine and dandy. For 30 seconds... :)
After that, the socket disconnects and connects again. And again. And again.
What I saw missing from the server response are the Connection: keep-alive
and Keep-Alive: timeout=5
headers that I get on my HTTP 1.1 server. The code is absolutely identical and communication does work just fine.
I suppose socket.io has some smart way of working over HTTP 2 but I couldn't find anything about this in the documentation.
It's also interesting that the client DOES request the keep-alive header, despite it running on HTTP 2. But alas, nothing is returned and the socket disconnects :(
I noticed somebody tried using SPDY via Express:
Getting socket.io, express & node-http2 to communicate though HTTP/2
I would consider this as a possible solution, but I would like this to work without SPDY as well.
...ANSWER
Answered 2020-Nov-26 at 07:25After encountering the EXACT same issue when using the WebSocket object in the browser, I dug deeper and found this in the documentation of the Google Load Balancer service we're using:
The timeout for a WebSocket connection depends on the configurable backend service timeout of the load balancer, which is 30 seconds by default. This timeout applies to WebSocket connections regardless of whether they are in use. For more information about the backend service timeout and how to configure it, see Timeouts and retries.
Check this article for more info about how to config your Load Balancer to correctly handle WebSockets:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-http2
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page