Amazon Web Services’ S3 can be a pretty good and cheap approach to webhosting, serving files at a cost of cents per 1000 hits.
How much of an improvement would it be to serve these files out of Amazon’s Cloudfront, the content delivery service that caches content around the world?
Here are the results of a brief experiment. In the month of June I served a 1.3 Megabyte sound file both from S3 and from Cloudfront to the WatchMouse monitoring network. I then measured the minimum time to connect, as well as the average download time for the two, and compared those across the locations from where they were downloaded.
The next table shows the minimum connect times in milliseconds.
What is noticeable is that the connect time to the S3 service increases with the geographical distance from Ireland, which is where the main file is hosted. The connect time to S3 is much more constant and a lot lower. This is good for web users waiting for their webpage to build up.
The following table shows the average download times in milliseconds.
Again, we see that the S3 download times correlate with distance, and Cloudfront download times being much more constant across the world, as well as being consistently lower.
From a business perspective, it makes sense to use Cloudfront as it will deliver a better user experience, but be aware that Cloudfront costs can be between a bit smaller than S3 costs and up to two times higher.