Let's start by briefly addressing how a cdn functions and then take a look at the best ways to utilize them. In it's simplest form a CDN is provides performance through using multiple servers. By using multiple servers to deliver content, your website is placing a lighter load on each and cutting down the distance needed to travel in almost all circumstances. These benefits are folded into your site by rewriting resource urls to your CDN service provider, but it's not really as complicated as you may think. Since you need to select a provider, lets start by identifying a few quality CDN providers.
Top CDN Providers
Integrating a quality CDN into your website is, at it's purest form, a server upgrade. The costs can be somewhat negligible since most decently visited spend less then a dollar a day (and usually pennies), but this is still not an area you'll want to skimp on. Below we've listed the ten most speedy & reliable CDN providers on the market today. Then we'll give you a brief description how they all panned out in our testing.
Top 10 Quality CDN Providers
After testing each, some surprising results emerged. The two "big boys" that seem to have planted their stake in the CDN market are clearly Google & Amazon. As a diehard Google loyalist I find it hard to push you away from any of their products, but they have a lot of ground to cover in this market. They certainly have the infrastructure, but their products are daunting to setup. Their Pagespeed offering is certainly the best of the two (all around), but you'll need to use their "Google App Engine" through command line to really tap into the powerful tools. Amazon however, has the perfect tact to capture this market. By providing a helpful amount of documentation, Amazon's AWS has made an advanced task perfectly within reach. The only point that could use some clarification is what part each of their sub-products handles. I'll explain this in a future blog post, but the short explanation is - S3 for files, Cloudfront for CDN, and Route 53 for DNS.
Besides unifying yourself with the companies who obviously pack a punch in pure size, there are a few upstarts that appear to have promising futures in the CDN market. The most notable performance player is certainly MaxCDN. Edgecast and Rackspace's offering (and lets be honest - Rackspace is always a good choice) are both solid, but MaxCDN is the clear standout. Ease of use and performance couldn't be better and the cost is about average.
As you'd imagine, Amazon and Google are able to offer the lowest cost at most scales... Size has it's benefits. If you have a reasonable amount of development knowledge you can't go wrong with MaxCDN. If you're still in the process of getting your feet wet, I'd suggest going with Amazon since both their costs and learning curve are low.
Top CDN CMS Plugins
The easiest way to think about how a CDN functions is that it's a copy of your site. It depends on how it's setup of course, but imagine that you have multiple clones of all your files sitting on various servers across the country... or world. On a static html site handling these redirections are easy, with a CDN on CMS they can get a little trickier. So, why start from scratch? The plugins below will do all that work for you and each has been tested to ensure easy and dynamic performance.
Joomla CDN Plugins
CDN for Joomla
This plugin is far and away your best option on Joomla. Setup is easy and it's very wisely coded. The paid version allows multiple CDN sets and https and is well worth the 30 pound cost.Plugin Details
JA Amazon S3
This free Joomla module is built exclusively for AWS and it's integration is solid. The file managing on the S3 side are a nice touch, but the best aspects of this Joomla CDN plugin is that it's free... and it works.Plugin Details
jomCDN is another strong contender. The largest drawback is that it runs a bit bulky. If you're a minimalist, I'd strongly recommend another approach. If you don't mind a plugin effecting you're cache (and probably a few other parts), jomCDN would be a good idea. Just set it and forget it.Plugin Details
Cloudflare for Joomla
This was our most conflicted option. The origin server plays a large roll in how Cloudflare seems to perform. If you get it setup though, it works just fine. Basically - if you can get Cloudflare working, this is the plugin to run.Plugin Details
WordPress CDN Plugins
W3 Total Cache
I can't say enough good things about this plugin. It handles every aspect of installation, performance, and documentation very well. If you use Wordpress on any sort of professional level, this is your best tool you can have to address both your cdn and cache management. Recommended.Plugin Details
From the talented folks over at Automatic comes an awesome addition to Wordpress. It does add a lot of cool functions, but if you're a code minimalist test it out first. There are a lot of useful tools, but it'll most likely effect other parts of a site.Plugin Details
Amazon S3 and Cloudfront
This plugin automatically replicates your sites files to Amazon S3. Once you've got your AWS account setup, you're pretty much good to go. The one downside would be that it lacks some of the bells and whistles of a W3 Total cache for example. No matter what, it's certainly a good backup to keep on hand.Plugin Details
With the universal love of Bootstrap, why not take advantage of all it's perks? This plugin uses NetDNA's amazing global content delivery network and keeps your scripts running current and delivered with impressive speed. This plugin obviously doesn't address the other files on your site, but it's certainly a great tool to use on smaller sites.Plugin Details
Drupal CDN Plugins
Drupal CDN Module
A Drupal CDN is essential when dealing with higher traffic sites. This Drupal CDN module allows you to easily integrate an “origin pull” network quickly and easily. Like several other Drupal offerings, when it’s done properly theres no need to have several options - this Drupal CDN module is all you should need. Recomended.Plugin Details
MaxCDN for Drupal
MaxCDN did a smart thing and built modules for all major CDNs that are constructed to easily install and run optimally. Their Drupal CDN module handles all the rewriting effectively and the company has a great reputation on support if you choose to select them as your provider.Plugin Details
Top CDN Tips
Tip #1 - Understand what's happening. It's easy to get in the "FTP mindframe", but the first step in avoiding CDN problems is to look at the big picture. A CDN network isn't exactly a series of mirrors, it requires some reminding when files are updated. By processing an invalidation or purge, you're notifying the edge servers that their file is an outdated version. This causes the edge server to pull the updated file. All CDN providers handle this process differently, but you should definitely know how to invalidate objects before you start running anything.
Tip #2 - If there's a problem, Purge. This isn't the title of a model's tell-all-novel, it actually helps developers quite a bit when working with CDNs. Purging does have some drawbacks, mostly because you're using resources to create / serve files. When you're developing a site, you'll need to utilize purging so getting familiar with the process really helps.
Tip #3 - Access has it's Privileges. Remember when you used to have to chmod items? It must be nice to know all that knowledge didn't go to waste. Depending on the setup - updated files will usually default to read/write for the owner only... This means you have to make those files publicly readable or the viewers browser will encounter a 500 error. The first thing you should think of after updating a file should be to adjust it's read/write privileges.
Tip #4 - Play the Field. Don't forget - one of the biggest benefits of utilizing a CDN is that you're not married to it's provider. You'll certainly want to keep your base files on a server you don't move around too much, but you can hop from one CDN provider to the next pretty easily.
Tip #5 - Plot your caching approach first. If you're anything like me, caching is something you learned the value of much later then you'd like to have. CDNs can be neglected in the same way. Sure - you can just turn it on and it will work, but in order to reap all of the benefits you really should plan your attack out. If you're running a CMS for example, you probably won't want the CDN provider to serve the "/administrator/*" files... And you'd probably want to serve a cached file over a raw one. Now this isn't rocket science, but it does take a little time to plot. And when in doubt - wait. The most valuable piece of advice I can give you, is that this is a "measure twice, cut once" situation.