Benefits of using a CDN (Content Delivery Network): My Analysis

Why should I use a CDN….is it it worth it?  You may be asking yourself this question.  My answer to this questions is YES, you should use a CDN and here is why.  Upon deciding to use a CDN, we researched several of the top companies.  The companies included Akami, Cloudflare, Amazon Cloud Front, EdgeCast and MaxCDN.

Our requirements were very simple for our CDN, we required an origin PULL style CDN that also allowed us to purge our files through an easy to use API.  What this means (origin PULL) is, if the asset that the user is looking for isn’t currently on the CDN for any reason, the CDN will pull (from the origin..usually www.) it off of the www version of our site automatically with no impact in speed to the user.  Also, being able to purge through an API was critical as the particular site that needed this has a custom CMS where the administrators are constantly updating images and other assets on the fly.

Our example use case for a PULL CDN:

User requests http://cdn.somesite.com/jquery.js and it’s the file isn’t there.  The CDN will automatically request http://www.somesite.com/jquery.js from our regular site, download, compress it and cache it on there servers.

In our initial testing, even when the CDN had to request our file from our site it was just as fast as if it was downloading from our site anyways.

After getting the initial pricing for this, Akami was instantly out as we couldn’t get into a plan for less than about $1500 a month.  This was a little out of our price range even though they seem to have to market share of all the larger companies.

After various reasons of not choosing the other CDN providers, EdgeCast was the fastest in getting back to us and there technical team was very helpful in getting the CDN launched very quickly.  They also had very competitive pricing and seemed to want to grow with us in terms of contract etc…  Also, since we are predominantly US based at the moment, we were very happy with there coverage here (and in Canada).

Once selecting EdgeCast, we were able to get up and running very quickly on the CDN.  We use Symfony Framework in the particular application so setting up the CDN was as simple as a configuration change to replace www. with cdn. on all image/css/js assets throughout the whole site.  From start to finish, our production environment (including SSL traffic) was up and running in about 2 days.

The site that we implemented the CDN now loads in less than 1 second.  Before we implemented the CDN it took about 1.25 second to load the site.  Here is a snapshot of what the Pingdom Website Speed Test says about our site after the CDN implementation.  Keep in mind, this particular site is an extremely complex application that sees more than 15,000 visits per day with an average of 5 page view per visit!

Website Speedtest Screenshot

 

 

 

One thing to notice also, is our New Relic score went up slightly, but we scored near perfect prior to implementing the CDN.