Amazon S3 and CloudFront
I first saw these services a while ago, and really thought they were way above my head. At the end of last month I decided to try them; partly because I wanted a scalable and globally distributed place to host the SimpleStats tracker code, and partly because I love to play with services like that.
Amazon S3 is almost a convention amongst web developers nowadays, partly because its price, but a large part of S3's success is the fact that Amazon, one of if not the largest on-line retailers and probably one of the most trusted brands on the internet. I know I was certainly bought by the trust aspect when I first looked at the services about a year ago, but then had no need to investigate any further.
For those who don't know what S3 is or does, S3 provides an on-line storage space that is highly scalable and very low in price, with a pay as you go business model which is great for people like me who don't have a massive budget, nor need to transfer terabytes of data in and out of their website. Amazon CloudFront is a distrubution side to the service, it offers geographical datacentre localization to your site's visitors so they get the best speed that their connection can obtain whilst downloading from your S3 "bucket". Twitter uses it for example, to host profile images.
All of my blog uploads and resources are now handled by my Amazon S3 and CloudFront accounts, and I couldn't be happier with the service. Taking this past month as an example, my bandwidth usage statistics for bandwidth were as follows:
And the statistics for this month:
Note that the site last.aelabs.net serves live listening stats from the last.fm API, so the bandwidth used for that can't be reduced easily.
I could downgrade my A Small Orange account with those savings, as I'm way under my 25GB quota, and with all of my data such as videos on Amazon S3, I don't need as much disk space.
Bandwidth savings is only half of the story. Uptime, is another, with S3 having an almost perfect track record for its uptime, usually exceeding 99.99% every month. Amazon also promise discounts if the service is down for certain percentages of time every month.
CloudFront is all about speed - and I think it works great. I'm going to use it for my future websites, just for the sheer speed advantage over hosting static content on a server designed to produce dynamic pages. I've switched all of the resources - CSS, JavaScript, images etc over to my CloudFront-mirrored S3 bucket, and I've found everything to be loading faster overall. Speed improvements are particularly noticeable on SimpleStats.net, where everything static is hosted on CF.
How much is this costing me? Well, this month, my bill is as follows:
$1.39. Which, in GBP, is just under £0.84. Totally worth it. (Click on the image to see the breakdown of how many requests that covers.)


