The best CDN network
The best CDN network
The day before yesterday I tested 3 major CDN networks to see how all these handle the traffic on my website and as well as optimizing my website to load it faster. I then came with the conclusion that not all CDN networks are best for all websites, it really depends on your resources that you need spread across servers also, however I did came with the conclusion on which is the best cdn network for my website, for you however may be different, it also depends on the location from which you are testing, some CDN servers may be better located to your location or have better peering with your network. In any case, here is my own view on the the 3 CDN networks I’ve had the chance to test, which are:
- Google Pagespeed
What to look when testing the CDN
- CDN response speed
Well is not really something to look, but first thing usually notice is the response time that you need to wait until you finish the request to a specific resource. I believe in all cases we can use both Cloudflare, MaxCDN and Google Pagespeed (with a little adjustment) to server *only* resources from the network, meaning that your main html website should still be served from the server. In this situation all 3 CDN network have been serving the website resources really nice, perfectly in fact. Advantages in this case goes to MaxCDN which was designed specifically to be used to server only website resources.
In the other 2 CDN network, I’ve also tested them on my whole domain name, meaning not serving only website resources, but the whole domain requests were passing through their servers. The options you have for Cloudflare are really nice, you have lots of options, apps to use, limits to set and all that. Pagespeed however comes directly with optimization set by Google and you can’t control them unfortunately. It is though still in beta, well for at least 2 years still beta. I already knew before testing but, any CDN network is best used to serve static content, meaning when having php dynamic requests, these would be having a bit if latency and so waiting time from server is higher. Adding the fact that you need to wait for requests to pass from your location through CDN server and then to your webserver, then of course time to reply back, the time taken is noticeable, even for fresh static content!
Well anyway, in my case, using a CDN network on the whole domain did not helped much unless I was leaving my website without making changes, eg. serving static pages. In this case, both serve the resources properly, may slightly faster on Cloudflare then Google Pagespeed.
- Flexibility and options
When you use a CDN network you will need to control certain section of your resources, like time to cache the resources for, option to cache some url’s that end with “?” separately an so on.
In this case, I tested all 3, however I found that only Cloudflare and MaxCDN offer proper flexibility over your cache content as well as statiscs, see bellow example from MaxCDN (cloudflare has something similar!):
In both images you will see that you will have some nice statistics and settings that you can use. You have even more, like setting a custom URL to serve CDN resources and other options.
Cloudflare has something similar based on two major tabs which are:
- Security Settings
- Performance Settings
Cloudflare has been designed to server the requests for whole domain names, thus some security settings were needed in order to properly serve them, also Cloudflare has had their main focus from the start with security, and it really is very well done. See bellow image:
Choosing the best CDN network for your website
I personally do not have an exact to-do that you can follow and confirm yourself that this is the best, as I said before, it mainly was best for me due to me already using a reverse cache proxy, thus I’ve been adding overhead to my dynamic pages if I choose to use Pagespeed or Cloudflare. As such, if you have a bare web server installation, please do try either Pagespeed service or Cloudflare, I do think it will work best for you guys.
For me however, as you can already check my website, it was best setting it to MaxCDN and only serve website resources through CDN while keeping the HTML page object (which should be a few kb in size) still on my main server. Thus response time from web server is kept with a minimum overhead, while CDN will server resources from a cached version stored across servers around the world.
Having said that, best CDN network for me was MaxCDN. Now I know that this is a paid service, but compared to Amazon or Akamai CDN prices, I believe these are really really cheap.
I hope this was a good read for all of you, may you have a speedy website, will see you again tomorrow with a new article.
Don’t forget to share it to others as speed is important for all websites!