This is going to require you to use your imagine, so just role with it and let’s see if there’s anything useful the be learned from this exercise.
Imagine you had a 55026 byte file (which happens to be size of the minified version of jQuery 1.3) that you needed to serve on the web. Beyond that we expect to use exactly 1 terabyte (TB) of bandwidth per month from browsers downloading our file.
There are two general approaches to dealing with this, use some sort of content delivery network (CDN) or put it up on a server some where. The traditional CDN approach is nice, but also tends to be pretty expensive. Hoping to stretch our dollars a little further we’ll skip the CDN option for now and see what the costs are for a dedicated server who’s only job is to serve up this 55026 byte file. The question then becomes, what’s the best deal per TB per month?
With that question in mind I went looking at some of the dedicated server providers to find out what the lowest cost was for servers that included at least 1 TB per month. To make comparison easier I didn’t include setup costs.
There are plenty of others, but this gives a reasonable sampling of per month costs. Remember, we aren’t comparing hardware specs, just what the base entry costs are for serving 1 TB per month.
This is where person A sticks up their hand and says,” Joseph, why didn’t you include Amazon EC2 in that list?” Reasonable question, let’s see what the minimum cost would be for 1 TB per month running the smallest EC2 instance for one month. This is really easy to do using the AWS monthly calculator. To keep things simple we’ll set instance hours to 744, data transfer out to 1000 GB and everything else to zero.
Amazon EC2: $244.40
The bandwidth costs alone for EC2 is $170.00 per month, the cost of an entire server at Layered Tech, the most expensive option on our list.
About this time person B grumbles something insulting towards person A and then speaks up and says “that’s just dumb. Just put the file on an Amazon S3 bucket and skip the server part entirely.” Not an exact comparison, is still one way to answer our question of how much it costs to server 1 TB of data. Sticking with our simplistic model I’m going to set the S3 storage and incoming bandwidth values to zero.
Amazon S3: $170
Not surprisingly the bandwidth costs for S3 are the same as EC2.
Person C can’t take it any more, he reaches over and slaps person B on the back of the head. “Hello, this is exactly the sort of thing that Amazon CloudFront was designed for.” This edges us near the traditional CDN approach, minus many of the spiffy CDN features. Any one want to guess how much it will cost to server 1 TB from CloudFront? We’ll set everything but the US out going traffic to zero.
Amazon CloudFront: $170
I know, amazing, the same exact cost as EC2 (for the bandwidth) and S3. Now in reality we’ve low balled this in all of the Amazon cases because there are other costs that come into play.
AWS (EC2, S3 and CloudFront) is going to charge you at least $170 per month for that 1 TB of bandwidth, no matter which service is being used. While AWS might be convenient it’s not likely to be the cheapest. And that’s okay if the other capabilities of AWS offset that extra cost for your particular needs. For instance, in the S3 and CloudFront cases Amazon takes care of running the servers for you.
It isn’t clear that all of the servers listed above would do well at serving 1 TB per month, that’s lot of sustained traffic. If we needed two servers to adequately deal with the load then that changes the cost structure quite a bit.