I wrote an overview on using ec2 for hosting facebook apps a few months back. I’ve been poking around a little more with EC2 lately and have a couple of items to report back.
Facebook ‘hello world’ Public EC2 image
I spotted this public ami for getting started with facebook, shipping with:
1. Facebook Client Libraries
2. HelloWorld Facebook Application that lists the objects in your Amazon S3 bucket
3. Footprints Facebook Application that is shipped with Facebook Client Libraries
New Large and Extra Large Instance Types
I mentioned previously about setting up a cluster of servers to deal with the potential high traffic for facebook apps, however amazon have released some more beefy images that could absorb a lot more traffic before showing the strain.
They now have 3 types of instance small, large, extra large:
Small Instance (default) (1)
1.7 GB memory, 32-bit platform
1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit)
160 GB instance storage (150 GB plus 10 GB root partition)
Instance Type name: m1.small (used in EC2 APIs)
Price: $0.10 per instance hour
7.5 GB memory, 64-bit platform
4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)
850 GB instance storage (2 x 420 GB plus 10 GB root partition)
Instance Type name: m1.large (used in EC2 APIs)
Price: $0.40 per instance hour
Extra Large Instance
15 GB memory, 64-bit platform
8 EC2 Compute Units (4 virtual cores with 2 EC2 Compute Units each)
1,690 GB instance storage (4 x 420 GB plus 10 GB root partition)
Instance Type name: m1.xlarge (used in EC2 APIs)
Price: $0.80 per instance hour
So potentially you could quickly shift from a small instance to large, then to extra large as required.
NB There are still great benefits to going down the cluster route rather than single server though, particular if you’re doing anything with a database (of course you are!) then you’ll really want to have replication onto a separate machine to ensure minimum data loss in the event of failure.