O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Amazonian Backends: Hosting on Elastic Cloud Computing

Problem

I want to make sure my app is able to scale up really quickly to meet demand. I’ve heard that Amazon’s Elastic Cloud Computing (EC2) service lets me add on servers as I need them, really cheaply. How do I host my app there?

Solution

As Amazon S3 is to storage, EC2 is to hosting (see Amazonian Backends: Simple Storage Solution). You can realize some pretty dramatic cost savings by hosting on EC2, particularly if your app needs to scale suddenly to meet demand.

Discussion

Setting up and running an EC2-based hosting system isn’t any easier than doing it the old-fashioned way, but it sure is cheaper. If you don’t have experience administering Linux-based systems, you might want to skip this approach or find a friend (or new employee) who does. There’s a pretty thorough tutorial on setting up and using AWS with Facebook available at http://tinyurl.com/2fs9f6 (Amazon really needs to do something about the URLs on its website).

Getting started is pretty simple: if you don’t already have an AWS account, you can sign up for one at http://www.amazonaws.com. You’ll then need to add EC2 to your Amazon Web Services by visiting the EC2 page (http://ec2.amazonaws.com) and clicking on the big “Sign Up For This Web Service” button on the right side (Figure 5-10).

Can you guess what this button does?

Figure 5-10. Can you guess what this button does?

You’re going to need an S3 account ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required