Amazon EC2 Basics


What is EC2

EC2 is Amazon's elastic computing cloud. It is a large farm of machines sliced into virtual systems that you can use on demand as the need arises. You can use it as a web hosting environment that is up 24/7/365, or you can simply turn a machine on, use it for a few hours and turn it off. You only pay for what you use.

How much does it cost

That is a good question. Amazon has three different service levels, small, large, and extra large. I suppose medium just wasn't a good buzzword.

The small instance reflects a single core 1 ghz xeon processor, 1.7 GB of RAM, and 160 GB of "instance storage" (more on that later). This is a 32 bit platform. The small instance costs $.10 / hour or partial hour that it is turned on. (~$72/month)

The large instance reflects 2 dual core 1 ghz xeon processors, 7.5 GB of RAM, and 850 GB of "instance storage". This is a 64 bit platform, as it would need to be since there is so much RAM. This costs $.40 / hour or partial hour that it is turned on. (~$288/month)

The extra large instance reflects 4 dual core 1ghz xeon processors, 15 GB RAM, and 1690 GB of "instance storage" on a 64 bit platform. This costs $.80/hour or partial hour that it is turned on (~$576/month).

These aren't the only charges. On top of the compute time, you have to pay for bandwidth and storage. Data going in is cheaper than data going out.

Inbound data is $.10/GB, Outbound data is $.18/GB for the first 10 terabytes and it gets cheaper from there.

Data transferred within the EC2 cloud - either from one EC2 server to another, or from another amazon service like S3 or SQS is free.

Amazon S3 storage is $.15 per GB per month. The same bandwidth charges as EC2 carries apply here as well. $.10/GB inbound / $.18/GB outbound. There's also a charge of $.01 per 1,000 PUT or LIST requests, and $.01 per 10,000 GET requests.

The pricing sounds very complicated, but it also sounds pretty cheap so far. I mean, the biggest charge they have for anything is $.80/hour and that's for a pretty stinking beefy computer.

Architecture implies overhead

Amazon's architecture implies overhead. It's as simple as that. The overhead isn't necessarily of fixed cost, but realistically using this system is a complex task and that means that you have to spend time figuring out how things work in order to make them work for you. You also have to figure out whether the elastic computing cloud makes sense as the primary solution for your particular business model or whether it makes sense as an extended or temporary solution for your business model. Let's take web hosting for example:

1) $72 / Month + Bandwidth for a dedicated machine you have root access on is pretty cheap. The downside is that you don't know anything about your throughput (i.e. how fast your disks are and how quickly they can process requests).
2) When your system goes down, you may or may not have all of the information you had there when it went down (in fact, chances are that you won't unless you take measures to ensure it).
3) No dedicated IP means that you have to play games with DNS and work with an external DNS provider.
4) HA solutions (i.e. load balancing, clustering) are roll-your-own and are thus a bit of a hack no matter which direction you go in.
5) If you do push your data out to S3, you are more assured that it is safe than any other solution that can be had for this price.
6) If your machine goes down, you can have a replacement up in a matter of minutes, not hours or days.
7) If your needs increase, simply reboot into a larger instance. The fees are higher, but your machine is beefier. That's pretty plain and simple.
8) If you have a design that scales linearly with hardware, the sky is the limit, scaling up the hardware is easy, but if you need to load balance you have to figure out a solution, test that solution, and implement it. That's a lot of overhead, but once that initial effort is in place it should be repeatable - and test environments are a few bucks an hour or less.

The flip side is that for $100-150 /month plus a couple grand initial investment, you can have a MUCH more robust system to work with. Of course, if you want to add a system, there's another couple of grand that you need to spend - and you have to maintain your hardware - failed disks, power supply issues, ram issues, etc.

I imagine that a high traffic discussion board would be pretty expensive to run through EC2 using most commercial discussion software (of which I've seen very few examples of things that were coded with low-end hardware scalability being a realistic possibility).

I think for web hosting, the lure of EC2 is there. I would attack it with the strategy that you need at least some hardware in place outside of the cloud, however. I would be interested to see how my static server compared with an EC2 instance - or even straight up against an S3 stored resource. Hmmm... benchmarks coming soon.



Talk About Amazon EC2 Basics