1

My company is currently migrating several websites and PHP web applications (standard LAMP stack) from three in-house servers to Amazon EC2. Because we had only three servers, we clustered several low-traffic websites with perhaps one high-traffic web application, and served them from the same server. The server admin has pretty much copied the previous architecture wholesale onto the EC2 instances, simply upping the instance size to account for the highest traffic client that occupies that particular instance.

This architecture might be okay if it wasn't for deployment. Any time one of these sites/apps changes, it means redeploying the entire instance, along with the 30 sites/apps it hosts, instead of just updating one.

How can we architect our cloud in a more modular fashion? Should each app get its own appropriately-sized instance? What is the best strategy for deployment in this type of situation?

closed as too broad by EEAA, mdpc, Ward, HBruijn, HopelessN00b Aug 23 '14 at 5:47

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Curious, why are you going to EC2 from in-house? – ewwhite Aug 21 '14 at 22:14
  • Better reliability and automatic scaling were the two main factors. – Mark Aug 21 '14 at 22:19
1

Your server admin has basically transfered your sites from one data-center to another. You're thinking of EC2 instances as traditional servers. Now it's time to change your thinking. Think of EC2 instances as containers for your web applications, and even part of your web application, rather than simply something you host them on.

Modularizing your websites is a good idea. You can split them up to be one EC2 instance per site. This way, when you deploy an update, only that website is affected (for good or for bad).

Also, you can put your sites behind appropriate load-balancers and/or auto-scaling groups to accommodate changes in load, based on each sites unique requirements.

Take a look at Elastic Beanstalk. It attempts to be an "out of the box" deployment mechanism for websites (PHP, .NET, Ruby, etc.). If all goes well, you shouldn't need to login to your instance. It uses one (or more) EC2 instances per web application, based on your configuration.

The downside to this is cost: you will pay more because you're using more EC2 instances. But that's the trade-off for modularity and reliability.

Not the answer you're looking for? Browse other questions tagged or ask your own question.