Closed MatthewWid closed 2 years ago
@MatthewWid: Would putting this node app behind a reverse proxy like Traefik
add most HTTP/2 advantages?
Using HTTP/2 would be worthwhile as the infamous 6
connections per domain issue and other performance issues would go away with HTTP/2.
@strarsis I'm not familiar with Traefik specifically but yes, an HTTP/2 proxy but still an HTTP/1.1 back-end should alleviate that issue.
The connection limit is imposed by the browser, so if your proxy talking to the browser supports HTTP/2 the connection limit will not be an issue. The Node-side can handle as many open connections as your operating system can.
As for performance it should be the same as once the connection is established and the session is open the library is simply writing data to a TCP socket whether you're using HTTP/1.1 or HTTP/2.
I haven't tested this so it's a bit of conjecture on my end, but I'm mostly confident that that should be the case.
Add support for HTTP/2 servers by conforming to the HTTP/2 Node interface.