Evaluating few CDN options

June 11th, 2011 | by Sajal Kayan |

Recently, I was evaluating CDN options for a client with some unique challenges. We ended up using Amazon CloudFront, but ill detail the options we looked at and what let us to this decision.

Some things to note:-

  • We would serve CSS, JS, Images referred to from stylesheets and some website images thru the CDN.
  • Due to the nature(trust me) of the site we expect a higher than normal miss rate. The access is spread across a wide number of urls, some may get lower hits.
  • Speed is important. Website should be fast(er) from everywhere. The most important regions in order of priority are US, EU, AU and ROTW with US being most important.
  • Anything on the site can change anytime, there is no build process as such. Any object anywhere can change, and change must be visible ASAP.
  • Developers/designers shouldn’t be harassed to purge a file if they change something.
  • CDN data usage : ~100 GB per month

The providers we looked at :-

MaxCDN: Almost sealed the deal.

Pros:-

  • Cheap : $40 for first TB (must use in a year) + $99 per additional TB . On current usage rates this comes to say 0.04+ /GB.
  • * Anycast/BGP routing : No way bad DNS server can mess up routing.
  • Nice control panel, has a purge all option for just in case. Purges take effect almost instantly.
  • Handles gzip well.
  • Can have separate cache timings for caching in Browser and caching at CDN. – i.e. We can say not cache a file in browser level, but cache at CDN and purge when theres a change made.

Cons:-

  • Poor global coverage. – No POP/Edge in Asia/AU – Deal Breaker
  • Pages loaded same speed when testing from AU with or without CDN.

EdgeCast: Looked good at first, but poor gziping.

Pros:-

  • Impressive list of networks
  • Highly configurable control panel.
  • Can have separate cache timings for caching in Browser and caching at CDN. – i.e. We can say not cache a file in browser level, but cache at CDN and purge when theres a change made.

Cons:-

  • Gzippable files will not be gzipped for cache misses. – Deal Breaker
  • Request from Edge server to origin is uncompressed.
  • Expensive and wants higher commitments.
  • DNS Based routing

CDNetworks: Didn’t look past price

Cons:-

  • Ridiculously high price – Dealbreaker

Amazon CloudFront: WIN

Pros:-

  • Testing showed our pages to be fastest from all regions when using cloudfront. YMMV
  • No commitments – $0.15 – $0.2/GB (depends on where user accesses from) + negligible per request fee
  • Client is already AWS user, one less account to maintain.
  • No need to send gazillion emails to gazillions of people to get started. No bargaining.

Cons:-

  • No POP/Edge in AU (but has in Singapore, Hong Kong and Tokyo)
  • DNS based routing.
  • Charges fee per request and per invalidation(purge) request.
  • No control panel, invalidation requests need to be done by API only.
  • Does not do gzipping, but honours Vary header and serves correct version based on what user asks.
  • Can’t use querystring parameters for CDN cachebusting. CloudFront ignores querystrings.

Sidenote : Requests from CloudFront to origin are HTTP 1.0 . Nginx by default does not serve gzip to 1.0 request. gzip_http_version setting must be changed in order to use nginx as origin for CloudFront.

The system we architected adds something based on the file mtime as a part of the URL, so now we don’t need to any purges at the CDN. Also now we can have far future expires on all CDN’d objects cause if something changes, the URL would automagically change.

For us, the price and features are important, but whats more important is the results. We went with the provider with lesser features just because our pages loaded fastest with them.

  • Anonymous

    Thanks for the article.

    I’ve also been using Amazon’s CDN for my website for almost a year now and it works great especially to speed up delivery of content to visitors from Asia.

    It would be nice if Amazon can add a server in AU.

  • http://twitter.com/bucketexplorer Bucket Explorer

    You can easy manage and use the services of Amazon S3,Import Export,SNS and Cloud front-CDN service in much easier way…
    http://www.bucketexplorer.com/documentation/cloudfront–amazon-cloudfront.html

  • Luke

    Did you check out rackspace cloudfiles? They use Akami and there’s no contract like S3 and it’s at .15 a gb. I’d be curious to see how it compares to s3 on speed.

  • Anonymous

    @0e9afe3cd5116f27de9f132942f4c913:disqus : Does cloudfiles support origin pull? I checked them out cpl of months ago, then they didnt have origin pull… and also they wouldnt say which edge servers will be operational. Them using Akamai does not mean that the whole akamai infrastructure would be available…

  • Anonymous

    Does cloudfiles support origin pull? I checked them out cpl of months
    ago, then they didnt have origin pull… and also they wouldnt say which
    edge servers will be operational. Them using Akamai does not mean that
    the whole akamai infrastructure would be available…

  • Luke

    as far as origin pull, I don’t think it does. If you’re using wordpress, you could use something like w3 cache which integrates with cloudfiles. I wondered the same thing about if they were using the Akami network or not.

  • Anonymous

    For this particular use case… push is a no-go…. has to be origin pull for a reason.

  • http://twitter.com/ARub1 Adam

    I wouldn’t use Akamai even if it was free. Way too slow. I get the worst ping times to Akamai.

  • http://www.adodis.com/Website-Design-Riyadh.php Website Designer Riyadh

    The most important thing is the way of describing any topic. Such a unique post it is. It is a good inspiration for all who are in to the habit of making posts. Keep continue.

  • http://www.hire-web-developers.com hire a web programmer

    Surely i will visit once again.. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work always.. I have never expect like this.. Really very interesting stuff..
    hire web developers | hire a website developer

  • http://dbpmarketing.com/wp-robot-review/ Adam Ghilchrist

    Dude, this is very critical exposed just what I’ve found it was too late. I guess this experimental compliments is very worthy to learn about CDN options. Thanks mate!

  • http://filsupport.com/web-design-outsource/ Web Design Outsource

    Glad to see your post. Thanks for sharing this one.

  • http://www.pacesol.com/cms-websites/drupal-development affordable drupal cms websites

    This is great if you’re a beginner, because you can use different tools in Drupal to contain and merge different ideas. When working on a website, most programmers will look for specific modules that cannot be merged to include on the website. When you first use it, Drupal may not seem as flexible as it turns out to be. Once you learn the program, the possibilities are almost limitless. If you’re new at it, Drupal is flexible and user-friendly, yet its power provides the professional programmer with opportunity to expand ideas to new and greater levels.

  • Guest
  • http://essayforme.com/ acedemic writing service

    I like this post! Thanks for it.

  • http://webpromoexpert.co.uk/ seo service

    The information was really awaited for me since inception of google plus.

  • http://runfaces.com/ free chatting

     I have bookmarked it and I am looking forward to reading new articles.Keep up the good work!  

  • http://meblibel.com.ua/ meblibel

    This article was extremely interesting, especially since I was searching for thoughts on this subject last week

  • http://www.seoresults.org/seo-services/seo-packages SEO packages

    All of our properties went up in pagerank or stayed the same. But you are right that some of the websites that we pay little attention to jumped higher than some of those that we actively work on.

  • http://essayswriter.org/ essay writing

     Awesome blog.

  • http://essayswriter.org/buy_essay buy essay

    I was very pleased to find this site.

  • Haibin Song

    Why is DNS based routing a negative for CDN?

  • http://writing-service.co.uk/ write my essay uk

    Its a very good post. I was very pleased to find this site.

  • http://autoarenda.kiev.ua/ autoarenda

    You made a great point in this post. I just spent some time reading all your posts and I must say you are a genius who always throws out smart opinions. Now you have me as your loyal reader. Keep writing great posts. I am looking forward to them.thank you.

  • Custom Thesis Website

    would
    like to thank you for the efforts you have made in writing this post. I am
    hoping the same

     

  • http://www.register-web-domain.in/ Domain Registration India

    Great piece.I like This type Of Blogs Thanks 

blog comments powered by Disqus