3 ms·
Is the common pattern to support http2 at the highest level? If a request goes through CDN/edge network -> Load Balancer -> nginx -> Python app, should http2 b
by webo 9y ago
Is the common pattern to support http2 at the highest level?
If a request goes through CDN/edge network -> Load Balancer -> nginx -> Python app, should http2 be enabled on all components or is enabling just on the CDN enough? Any pros/cons?
With HTTPS, usually enabling on the CDN is good enough for most cases.
- bluejekyll 9y agoThat will only get you the protocol. All of the server push stuff for example, needs to be supported by the actual web server.
- luhn 9y agoNo, a CDN can support HTTP/2 server push on it's own. For example, https://www.cloudflare.com/website-optimization/http2/serverpush/ https://www.cloudflare.com/website-optimization/http2/server...
- predakanga 9y agoThat's not correct - while any HTTP/2 capable servers along the path may implement server push, the most important one is the closest server to the user (i.e. the CDN). The only requirement is that the intermediate servers must not strip out the server push headers/tags, so that the edge server knows what to actually push. It's quite possible to have your own server provide HTTP/1.1 and still take advantage of server push, and this is a usecase supported by Akamai[1], Cloudflare[2], and I suspect other CDNs (can't find details) - you may get better performance using HTTP/2 on that intermediate link, but that's less likely to be because of server push. [1]: https://blogs.akamai.com/2016/04/are-you-ready-for-http2-server-push.html https://blogs.akamai.com/2016/04/are-you-ready-for-http2-ser... [2]: https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/ https://blog.cloudflare.com/announcing-support-for-http-2-se...
- bluejekyll 9y agoAh yes. For static content your correct. I've got my head in dynamic stuff at the moment. Of course you're right.
- predakanga 9y agoEnabling HTTPS on the CDN is good for the users, but please consider using it between the CDN and your network as well - if nothing else, it prevents situations like this: https://medium.com/@karthikb351/airtel-is-sniffing-and-censoring-cloudflares-traffic-in-india-and-they-don-t-even-know-it-90935f7f6d98 https://medium.com/@karthikb351/airtel-is-sniffing-and-censo...