Selecting the right CDN for YOUR website
At one of my jobs, we recently went through the process of selecting a CDN (Content Delivery Network) for our site. While the first rule of CDN's is that "any CDN is better than no CDN", it can be argued that certain CDN's are a better fit in certain situation than others. This post is basically a summary of the process we went through when selecting our CDN. By no means is this a statement of "XYZ is better than ABC", it's simply documentation of the process we went through in order to select the right one for our business. While most CDN's are compatible with Drupal via excellent contrib modules such as CDN, this information presented in this article is relative to any website and isn't Drupal-specific.
To illustrate the importance of a CDN using real numbers, one image being fetched from the data center to our office takes about 323ms. That same image fetched from Seattle is 483ms, and from Washington DC takes 599ms. The worst cases appear when coming overseas - to fetch the same image from Paris it takes on average 1,141ms for just that one image.
A Content Delivery Network (CDN) shortens that distance between your static content and the end-user. While the text on most web pages is dynamic, most images, JavaScript, and CSS are static. These static objects make up a large percentage of the total bytes downloaded for each page view. By using a CDN, you place static content as close to the end-user as possible. In turn this decreases the page load time a end-user experiences by leaps and bounds.
Pre-selection Criteria
There's a plethora of CDN's to choose from, and if you don't filter the initial list down to five or fewer providers, you'll end up spending months in evaluation time. By defining specific must-have features, we were able to limit the initial number of companies to compare to four. Many CDN's provide value-add services above and beyone static objects, such as "Dynamic Site Acceleration" -- this evaluation looked solely at serving up static file content, e.g. JPEG, GIF, CSS, and Javascript.
The filtering properties we used to limit scope were:
- The CDN must provide "origin pull" or "reverse proxy" support. If the CDN receives a request for a file that doesn't exist at the edge, it applies a customer-defined URL rewrite to the request, and proxies the request to the origin site. If the image exists at the origin, the edge server caches the image locally and serves it to the client from there. For example, the CDN host name might be cdn.example.com (which points to the edge), and the origin site (my server) would be www.example.com. If I point my browser to http://cdn.example.com/logo.gif, and that file doesn't exist at the edge, the CDN will make a request for http://www.example.com/logo.gif. If that file exists, it is fetched and cached. If it doesn't exist, a 404 is returned to the client. The trade off is that you don't have to pre-seed static content to the CDN, but the first user request for a static object takes a bit longer to complete (because it results in two requests instead of one). Once the edge network's cache is primed, there is no performance difference between origin pull and CDN origin.
- The CDN must propagate cache-related HTTP headers from the origin to the end-user. We've went to great lengths to use versioning of filenames so that we can set far-future expires headers on 99% of our static content as recommended by Yahoo's "Best Practices for Speeding Up Your Website". This results in far fewer HTTP requests to render a page that has already been requested by the end-user previously, ultimately decreasing page response time. Some CDN's that offer origin pull do not proxy these headers back.
- The CDN must use GZip compression on text-based content. Most CDN's support this, but it's something you definitely want to check. When serving up static text-based content such as CSS or Javascript, the CDN can and should compress it for you before sending it to the end-user. Compression makes the overall page content smaller, and therefore faster to render.
- Response time must be consistent and fast. Performance is a tricky thing. While having the fastest response time overall didn't guarantee that a CDN would "win", having consistent relative poor performance would guarantee a CDN would "lose". Try not to focus too much on performance numbers -- most of the CDN's will have a standard deviation less than ten milliseconds between each other. In our research we found out quickly that there's a lot of features more important to us than 5ms worth of response time.
- 100% Uptime SLA. Since a CDN is at it's most basic level a geographically distributed cluster of cache servers, it should be implied that a CDN can provide 100% uptime. If one POP goes down, requests should be automatically routed to the next nearest POP. If your CDN doesn't offer this, you need a new CDN.
- Company financial strength and solvency. This is something often overlooked when people evaluate, but was very important to us. There are a lot of CDN's out there, and we found only 2 or 3 that could put in writing that they are a profitable corporation. Our implementation required a fair amount of work, and it would take us some time to switch to another CDN. If your CDN goes dark in the middle of the night, how long will it take you to switch?
Important Features
Whereas not meeting any of the above requirements would result in being excluded from our comparison, the following features were key points of consideration. Not meeting them all wouldn't exclude a CDN, but on the flip side, implementing them all would put the CDN in very good standing.
- Price. While high prices weren't going to scare us away, bang for the buck played a large part in our decision. We weren't interested in paying a premium for brand recognition.
- Strong international presence. Our guests include international clients, and poor static object performance for those clients was the key motivation for implementing a CDN in the first place.
- Contract terms. Some CDN's do month-to-month, some do 12 month, others require longer as you negotiate price.
- Overage fees. CDN's meter you on the amount of bandwidth you consume. You pay for a "bucket". No CDN's turn your service off after you exceed that bucket, they just bill you for overages. The good CDN's will bill you at the same per-GB rate that you pay for your monthly bucket. Some CDN's charge as much as 2x for overages. Avoid those.
- Traffic accounting. One other thing often overlooked with origin pull CDN's is whether or not the traffic between the edge POP's and the customer origin is counted as traffic against your total. Some CDN's count it against your bucket, others don't.
- Setup fees. CDN's vary wildly on their setup fees. Some are free, some charge more than $5,000. Make sure you incorporate that cost into your decision.
- User Interface. All CDN's offer some form of web-based interface. The quality of the interface greatly differs between CDN's. I could swear that some of the interfaces I saw were written in CGI Perl in the late 90's. Others interfaces offered everything a customer could ever want, including detailed analytics and reporting. Key questions to ask are "If I get a bad image out on the edge, how do I purge it?", and "How do I tell how much bandwidth is being consumed throughout the CDN at any particular point in time?"
External Reporting Data
We chose to invest in one month's worth of reporting from CloudHarmony's CloudReports service. This gave us a quick way to examine performance of CDN's to the actual end-user browser behind a real cable/dsl/dialup connection (not to a datacenter somewhere). While some might view those reports expensive, we found it quite a bargain to have another independent view into the performance of a vast majority of CDN's.
The Contenders
Given the above requirements, coupled with the performance data provided from CloudHarmony we were able to refine our list of CDN's to consider. In alphabetical order:
First elimination: Akamai
Akamai is to the CDN market what Bose is to the home audio market. While it's not inherently a bad product, you're paying a huge premium for the brand name. While we never got so far as to setup a demo account, the performance data provided by CloudHarmony and other sources didn't favor them well at all. My personal opinion (which is little more than a wild guess) on why Akamai doesn't perform as well is because of their product's age. Their network is by far the largest one out there, and I can guess that keeping up with the latest optimizations and protocols is a huge undertaking.
When speaking with Akamai, I got the impression that they really don't care to sell their static object delivery product by itself. Their reps focused mostly on trying to upsell their Dynamic Site Acceleration product. While DSA might indeed be a great product, it wasn't what we were interested in.
In the end, the best price I could get out of Akamai was more than twice that of the next most expensive CDN in our comparison, and they wanted a 3 year contract at that price. I'm just not that into paying twice as much for an equal product, so they were eliminated. If we should move to a Dynamic Site Acceleration type of service later, Akamai will definitely be re-evaluated at that time.
Second elimination: LimeLight
LimeLight Networks is the 2nd largest CDN provider, behind Akamai. It’s fitting that they are right behind Akamai, because they came across like a smaller Akamai to me. Their pricing is much more competitive than Akamai, and performance appeared to be quite good across the board. They supposedly have a nice web and reporting interface, but I was unable to get a demo setup without filling out paperwork that would have required approval from our legal department. Therein lies the problem with LimeLight -- getting them to do anything outside the everyday norm was like pulling teeth. Like Akamai, LimeLight also is focused on the upsell and seemed to me generally disinterested in selling their static delivery service.
If for some reason, we had to switch away from our primary choice, my second choice would likely be LimeLight Networks, but only after I was able to obtain a demo account so that I could verify their performance was within acceptable range and the functionality of their user interface.
Independent Performance comparisons
I was able to easily procure demo accounts from EdgeCast and CacheFly, so I set up some performance testing of our own using Pingdom to download a typical JPEG image from each Pingdom POP using the origin pull setup. Note that since Pingdom's servers are in data centers and not in actual residences; this isn't a measure of end-to-end performance, rather a way to compare apples to apples response time from various regions around the world. The executive summary here is that while EdgeCast "edged" out CacheFly, the real message is that any CDN is so much better than none at all:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
... and to really drive the point home for the PHB's, we consolidate the data and give a very telling graph:

Third elimination: CacheFly
CacheFly is an up-and-comer in the CDN arena. They have very aggressive pricing, and have very good performance as well. If the site in question was a popular blog or community website and was very price sensitive, I would select CacheFly as my first choice CDN. However, where they fall short is in reporting and their web interface. The best way to contact their support department is via email or web-based form. Their web interface left a huge amount to be desired, and they have very little documentation on how to use it. There is no reporting whatsoever – you get raw log files and have to write our own reporting scripts on top of that data. I couldn't help but wonder about all the “what ifs”. What if we get an incorrect image cached and need to have it cleared from their network? If we see a DDoS at the CDN, how do we know? These and other similiar questions are what ultimately eliminated CacheFly.
In CacheFly's defense, I was told that they were working on a complete refactor of the user interface and was offered a chance to help beta it, but I was under time constraints and declined. The issues I had with the UI may or may not be present at the time of this writing.
The winner (for us): EdgeCast
It will appear when reading this post that I used the process of elimination to find the "lesser of all evils", but understand that's just the writing style I chose to convey the process. It wasn't that EdgeCast didn't lose, it's that they won. Here's why:
- EdgeCast is routinely in the top tier of CDN’s in terms of performance.
- Their support is very knowledgeable and responsive.
- The sales reps care about your business and are willing to work with you.
- They offer the most features of any CDN I evaluated. One such feature is "rollover" where if you don't use all your allotted transfer for one month, the remainder gets added to next months allotment. This is perfect for a business with holiday traffic spikes such as ours.
- While they aren’t the cheapest CDN, they are certainly affordable, and offered the best “bang for the buck” for the feature set we needed.
- Their UI is fully functional, offering configuration, reporting, and analytics in an easy to use fashion. The UI includes a fully functional rules engine (for additional charge) that allows you to apply actions such as cache purge, header change, etc based upon conditions like client IP, HTTP request header, etc.
- Last but certainly not least, the company is one of only two profitable CDN’s in the market today.
IT'S NOT THE DESTINATION, IT'S THE JOURNEY!!!
Please don't read this article and walk away saying "Justin recommends EdgeCast, that's who we're going with". For one, if you're letting my blog posts make business decisions for you instead of doing due diligence, then you're doing it wrong.
For our very specific needs EdgeCast was the best fit. For your needs, you will very possibly arrive at a completely different decision, and that's great. By all means, blog about it. What I'm trying to convey is that there are a lot of points of comparison when going through your evaluation, and not all of them are obvious. It's hard to get an objective point of view when doing this on your own -- this is my best attempt at documenting what I came across.
Hopefully if you haven't implemented a CDN for your busy sites, this post will motivate you to do so. If you're unhappy with your current CDN, perhaps this post has given you some insight on how to find a replacement. If you're happy with your current CDN, please leave comments as to why.
Lastly, I was in no way influenced monetarily or otherwise by any vendors, and none of the links in this article contain referral ID's. This is all my personal opinion and in no way represents the opinion of my employers.
Comments
Very informative post, thanks
Very informative post, thanks for writing it!
This is a great write up.
This is a great write up. Thanks for taking the time and effort to share your learning.
I am curious why you didn't consider Amazon CloudFront or Softlayer's Cloudlayer CDN.
CloudFront and CloudLayer
CloudFront didn't start doing origin pull until just recently -- they didn't have it when I did the initial research.
CloudLayer is simply Softlayer's branding on top of InterNAP's CDN product. They were in the initial group, but every time I asked a technical question, they "had to get back to me". I'm guessing it was because they were contacting InterNAP's engineers behind the scenes.
Again, nothing wrong with either of them, just not the right fit for us.
Justin
Good point to know about the
Good point to know about the Softlayer CDN. Thanks for the tip. :-)
Really interesting as only starting out CDN research
Thanks. Thought this was a really good article as there is not much out there on CDN & Drupal. Will definitely use it as a starting point for our own research.
Great walk-through of your elimination process
I very much enjoyed the read. You gave me insight into what to look for and how to look for it.
CDNetworks is profitable
Why no mention of CDNetworks? It's the 3rd largest CDN...and profitable.
CDNetworks
John, there was no mention of CDNetworks because
There's just so many CDN's out there that you can't look at each one. Do you use them? How are they as far as performance and features?
Justin, CDNetworks began CDN
Justin,
CDNetworks began CDN services in Korea 10 years ago, then moved westward. They have over 300 employees, more than $100M in yearly revenue and specialize in global CDN services (along with dynamic apps). Full disclosure: I perform marketing functions for CDNetworks. John
Lots of options
Acamai is more like buying pro audio gear for your home audio setup. You only need it if you have the money or need the absolute best or you just absolutely have to have the pop only akamai provides. Their pricing model is not really compatible with smaller shops though.
There are actually tons of options in the CDN market though. There is CDNetworks is another options as another poster mentioned(PantherExpress was great but I dont' have any experience with CDNetworks directly). Also you might look at http://www.netdna.com/ which is used by http://adbard.net/ if you look take a peak at images.adbard.net.
CDN module + more CDNs
I'm glad you like the CDN module — I'm the developer of it :)
More Origin Pull CDNs:
• Amazon CloudFront (with its recently added custom origin support, it now supports Origin Pull)
• MaxCDN/NetDNA (same company, NetDNA is targeted at businesses, MaxCDN at bloggers)
Add new comment