Amazon EC2 VS Elastic Beanstalk
This is one question that we get asked a lot: “Should I deploy my website and database both on an EC2 instance, or should I go for an Elastic Beanstalk environment and an RDS?”
For example, if you have a PHP/MySQL website, you may launch an EC2 instance and install everything in there.
Or, you may launch and RDS instance for the database, and an EBS environment for the PHP website.
In our experience, both approaches are valid, but the best answer will depend on:
– the load you are expecting
– how much are you willing to pay
– how much time do you have to handle server administration tasks (such as backups, configs, etc.)
If you expect heavy or variable loads, there are many reasons why not to deploy a production PHP + MySQL application on a single EC2, and you will leave aside all the benefits of auto-scaling that AWS is good for.
Some of the pay offs of deploying to Elastic Beanstalk instead of a manually configured EC2 are:
– You can scale up or down automatically if you need more/less instances to handle new load.
– You get a load-balancer in front of your EC2s instances with a bunch of out-of-the-box “recommended” configurations.
– You get version control of each deployment.
– Everything necessary should be pre-installed and configured, so you don’t waste your time installing/updating/securing anything.
Regarding MySQL, if you go for an Amazon RDS instance you can handle replication, monitoring and automatic backups with pretty low effort. If you need to make some changes at server level, most of the configurations are available through parameter-groups.
On the other hand, if you want to have full control of everything that is going on on your server (and that means you have time to monitor, backup and do maintenance tasks, which is not our case :), or if you do not plan to have much traffic, you should go with an EC2 instance.
Also, the EC2 instance is the less expensive option, so if you are short of budget or at development/POC stage, maybe is the way to go, at least at the beginning.
In our experience, and after 2 years of working on AWS with more than 10 production applications, pretty much every customization or change we needed on both RDS and EBS we were able to tweak it and get it working, so we are pretty satisfied with choosing the EBS+RDS option, after all, we are making better use of our time by developing our products instead of taking care of boring infrastructure tasks.
Move your Windows workloads to AWS EC2 Windows instances.
Here an example of one Success Cases of AWS EC2
We are BigCheese, an engineering in-house team.