Jun 2011

Amazon CloudFront vs RackSpace Cloud Files Performance Testing

by Steve Wortham
I've been using Amazon S3 coupled with Amazon CloudFront as my CDN for about half a year now. It's been a great service. It's fast and cheap, and relatively easy to set up. There's no monthly fee as they charge purely on usage. My sites are only receiving a few hundred visits a day collectively. And all I'm using the CDN for are small images so far, so it's only been costing me about 10 cents a month. Yep, 10 cents.

But after a recent post at Coding Horror, I was left wondering if perhaps there was something even better than Amazon CloudFront that wasn't orders of magnitude more expensive.

Turns out, there is. It's called RackSpace Cloud Files. Pricing is comparable to Amazon and is based on usage, but RackSpace uses the Akamai network. Akamai has been around a long time and has a huge widespread network with servers deployed in 72 countries. As a result their speed is good pretty much everywhere.

So I signed up with RackSpace today and performed some tests with webpagetest.org. I tested 7 locations which I chose loosely based on the traffic I actually receive from different parts of the world. And to keep it simple, I was loading an 18KB jpg. Because bandwidth on these test servers can sometimes fluctuate, I ran each test twice and recorded the faster times for each respective location.

Below are the results...

So RackSpace wins in 5 out of 7 locations. If you add up the load times of this sampling you'll get 5.645 seconds for Amazon CloudFront and 4.203 seconds for RackSpace Cloud Files. So RackSpace is about 34% faster in my tests. The location that really stands out is Australia which is roughly 4X faster with RackSpace. And then Amazon seems to be faster in India, but not by nearly as large of a margin. Some of the others are a little closer to call, and it may be a different story at a different time of day (too many variables to predict). But it's pretty clear that the abundant Akamai network being available in so many locations has its advantages.

At this point though, the big reason I'm switching to RackSpace is that they support gzip compression natively. Up until now I've mostly just been using a CDN for images, where gzip doesn't help a thing anyway. But I'd like to push my css and js files to a CDN if only the CDN supported gzip. You can use gzip with Amazon CloudFront if you set up a Custom Origin, but this looked like a bit of hassle.

RackSpace, however, enables gzip compression automatically for any css or js file you upload. So now that gzip is at my disposal, I'm in the process of moving even more content over to the CDN world in hopes of making my sites unbelievably fast.

UPDATE (February 21, 2012)
I found that RackSpace had become sporadically slow the past few months.  Some days it would be blazing fast while others would be painfully slow (like 5 seconds to download an image less than 50 KB in size).  My guess is that the DNS was slow to resolve but it was tough to find out since it was so inconsistent.

Anyway, today I switched back to Amazon for hosting my images.  And then I'm serving up my css and js with my own server again.  This solution seems to work pretty well and I'll stick with it for now.

Hopefully one of two things will happen:
1. RackSpace will solve the inconsistent performance problems I was experiencing.
2. Amazon CloudFront/S3 will introduce native support for gzip.