Skip to content

HTTP/2 Support #10842

Answered by Timer
PlopTheReal asked this question in Help
Mar 5, 2020 · 5 comments · 8 replies
Discussion options

You must be logged in to vote

HTTP/2 is typically a concern handled by your deployment step.

For example, when deploying to Vercel, your deployment is automatically served over HTTP/2, compressed with Brotli/Gzip, and downloaded from a CDN edge nearest to your end-user.

For self-hosting, it is best practice to configure your application behind Nginx (or another reverse proxy) for optimum performance. Nginx should handle HTTP/2, the HTTPS termination, Gzip compression, etc.
Only the localhost traffic (between Nginx and Node) would be over HTTP/1.1, where the latency is effectively zero.

If you must serve your application in production directly from a Node.js server, you can look at our with-http2 example.

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@d9j
Comment options

@YutaMoriJP
Comment options

Answer selected by Timer
Comment options

You must be logged in to vote
6 replies
@PlopTheReal
Comment options

@Timer
Comment options

Timer Mar 5, 2020
Maintainer

@PlopTheReal
Comment options

@Manouchehri
Comment options

@Manouchehri
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
8 participants