External Caching Providers - Performance through outsourcing

by Woodrowg 10. July 2009 08:49

Ok so you have got this great website which you have spent a high percentage of last 6 months writing. It goes live and becomes the next twitter. The pages are small but the graphical designer has made it a thing of beauty and therein lies the problem. Its chewing bandwidth and it is looking like you are going to have to get 4 new servers for the data center just to deliver out the static images, not to mention the old horse of a load balancer that is getting asthma trying to keep up with demand. Plus half your customers are from across the pond which would mean possibly setting up a new co-location just to get a reasonable display time over there.

Where to turn and quick without killing the budget, I have had similar issues in the past believe it or not but I had already planned for them and as a boy scout being prepared is always good. Content delivery networks seem like a last resort but if you plan well from the beginning a switch to a CDN can be painless and an almost enjoyable experience.

We use Akamai but there are a number of providers out there all of which provide a good service. In regards to planning I can only give you one hint. If you are putting your images in a directory called Images in your project I will have to show you the error of your ways.

From the start of a project always plan to have your images on its on subdomain. “What!” I hear you cry, its own sub-domain, but why. By having your own sub domain you have a really nice way to separate your dynamic from your static content. At the beginning you will be able to set up some servers in your own farm running Lighttpd of similar lightweight webserver, yes on linux I know but sometimes you have to bite the sour apple.

The other good think about separate domains is in theory you can maintain your graphics in their own source code environment which means your graphic designers can have their own SCM system and processes, which works really well in bigger teams. When it comes to the time to upgrade to a CDN it can be as simple as creating an account, doing a little config and then repointing your subdomain to the CDN. Some CDNS load the content on demand from a library server, which would be your old image server, and only access the stuff that is actually being used. Which of course saves you the effort of maintaining all the images online via FTP or something similar. I have seen this architecture in action and trust me, it makes sense to get this in on the ground floor.

If you are planning on being big think big!
No I don’t use a CDN for my blog, but maybe one day I might have too!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Adventures with Code

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Gary, the last of the unbloged is finaly giving up and will try as often as posible to add anything interesting he finds to this site. especially stuff like ASP.net MVC and things to make people smile