简体   繁体   中英

Do we need to Enable http2 on Apache server , If the CDN has Http2 enabled

We have a website which is in CDN and HTTP2 is enabled . Does it makes any difference if we enable HTTP2 with Apache server.

It depends on the CDN you are using and if they can speak HTTP/2 back to the origin server. Cloudflare for example only uses HTTP/1 back to origin: Can i use HTTP/2 between origin and cloudflare servers?(Apache)

Most of the benefit of HTTP/2 is client to first point of contact (ie the CDN) as HTTP/2 improves lower latency, lower bandwith connections. CDN to Origin servers connections are likely to be higher latency and higher bandwith so are likely to benefit less from HTTP/2 over HTTP/1.

Finally using a CDN is one of the easiest ways to give you HTTP/2 without having to make any changes on your side, so yes it's perfectly acceptable to leave the origin server over HTTP/1. Obviously that means you won't benefit the full way, and may not be able to use things like server push (unless implemented at the CDN level), but it still should be a good improvement until HTTP/2 becomes more readily available in server distributions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM