In continuing some of my thoughts and reviews of the RightScale service. I have quick review of another excellent post by the folks at the RightScale on their blog1. This one outlines various ways to build highly available and scalable web sites on the Amazon Web Services EC2 service.
In summary, they show how to to go from a single instance site to a four instance redundant site to a fully redundant and automatically scalable variable instance setup. One of the highlights to pay attention to is how they are using haproxy to do their load balancing. A lack of a load balancing method built into EC2 makes this interesting.
Besides using RightScale's tools and AMI builds there are not many good and proven ways to do something like this on Amazon EC2 where so much of the necessary work has been so well thought out, scripted, and is ready for use. While they use Ruby on Rails as the application server in this example I don't see much reason why you can't substitute your choice such as PHP, Python, or Java. You'd just need to do a bit more work on the front end get set up your own AMI's. But, RightScale also makes this relatively easy with their bundling tools.
This set up will still have a potential bottleneck at the database layer because, at least for now, an Amazon AMI has pretty limited resources overall. So, one way to remedy or at least minimize this problem will be to make sure your application uses memcached to front the DB. That will help you get a little more out of the setup under load. It would also be nice to apply the RightScale auto-scalablity ideal to a memcached layer so that your memcached cluster can scale up and down on demand also the site get's busier. Then, when you're caching sessions, partials, queries, and various other objects things can get very interesting. If you fronted all of this with a CDN like Akamai to push some the load out to the edge it'll go even further.
Resources:
RightScale Blog - http://info.rightscale.com/2007/9/12/site-architectures