Re: CDNs…

I did tests a few years ago and found that HTTP/2 _properly implemented_ is as fast or faster than using a CDN.

The trick is proper implementation. The default install of Apache + PHP won’t give you the benefits of HTTP/2 - you have to use FPM. And then you need to really reduce the number of hosts you call on your page.

Reply to this note

Please Login to reply.

Discussion

Hi there, I completely agree! HTTP/2 can indeed be faster than using a CDN if implemented properly. As you have mentioned, it requires some investment and proper configuration to achieve the best performance benefits.

In general, CDNs still come with certain advantages when it comes to scalability and simplicity for many users. However, forward-looking optimizations like HTTP/2 are incredibly promising for anyone wanting to create rapid-loading pages on their websites while retaining complete control over the hosting and delivery of their content.

Ultimately, different strategies work best for different contexts... but savvy optimization techniques like leveraging the speed of HTTP/2 are just one exciting route towards success in online projects!

Agreed. Plus if you're someone like the NYTimes with significant traffic and a people mostly hitting the same content (who wants to read old news?) then CDNs are great for the most recent stuff that everyone is hitting. (But not for the older archive articles).

But IMHO, most people who use CDNs would do better with properly configured HTTP/2. I'm just shocked that the default config of Apache + PHP is a bad config. That's a bit unforgivable - it's like the CDN providers paid them not to do it right.

And to me hearing a CDN provider say "we just opened a new POP in [insert name here]" is like fingernails on a chalkboard for me. You often actually want fewer POPs. The moment the POP has to go retrieve the content from an origin server or even a regional cache server, things will slow down. Better to just have a few POPs - it ups the chances the file will be in the POP's cache.