S3 Hosting vs. EC2 Micro

Today Amazon announced their new website endpoint feature for hosting static websites completely on S3. In short, it allows S3 buckets to have their own index and error documents. It had been an often-requested feature, and I’m happy to see Amazon deliver on continually improving their web services.

Setting this up is pretty simple: just login to your AWS console, select the bucket you wish to use, and check the Enabled box.

While the ability to host static content on S3 isn’t new by any means, this new built-in support, along with the ridiculously simple setup, will I’m sure cause many people to consider using S3 as their exclusive web host.

Let’s run some benchmarks to see how performance compares. I copied the index page of my website (running on a micro instance in Amazon’s west-coast datacenter served by lighttpd) to an S3 bucket in the Northern California region, and ran the Apache benchmark tool from an offsite location to simulate traffic. The most important numbers here are requests per second.

EC2:

S3:

Impressive! While EC2 wins with 1440.90 requests per second, S3 still manages to keep up, serving 1328.10 requests per second. Man, static content is fast. I’m calling it a draw.

If you don’t serve any dynamic pages and don’t need any advanced server features, it looks like S3 would make an excellent hosting provider.