I want to deploy 2 Symfony2 projects onto an EC2 server. In addition I am thinking about using a service like scalr.net, ylastic.com or Rightscale to manage my instances, scale it if needed and monitor it.
My questions are basically:
1.) What do you have for suggestions. Right now I am running the whole application on a dedicated ubuntu server but I am getting to a point where I need to get scalable power and speed – that’s actually the main reason why I want to move to ec2 (and plus I have a lot on S3).
2.) Are there any AMI’s that are suggested and good for Symfony2? I have seen services like https://aws.amazon.com/marketplace that give you pre-installed images but charge you for it. Not sure if this is any good since I think I can set up my own server as well.
3.) If I am using Ec2, is it best practise to put all the web data onto an ebs volume and use the amazon database for the database?
Here are some very basic thoughts and you should consider everything carefully before starting to work on something you maybe don’t really need.
1.) First you should take a look at the resources your application consumes most. Do you need a lot of memory, CPU, Disk I/O? Depending on that you can decide which Amazon Web Services you’d like to take advantage of.
For example a simple scenario is one ELB combined with an Auto Scaling group, which handles the EC2 instances, backed by one RDS instance, which provides a dedicated database.
2.) You can go with a preconfigured LAMP by BitNami and then customize it. After that create your own AMI of it and use it for your Auto Scaling group (a really basic approach). On the other hand you can start with a clean Linux distribution and setup everything yourself (manual or automated via Chef). Depending on how many updates your application will receive you should consider hosting it on github to enable your servers to always pull a up-2-date copy of it when booting up.
3.) Depends on point 1.) … The easiest approach is definitely going with RDS, because EBS volumes have poor disk I/O and you’ll have to run them in Raid 0 to get the disk I/O you want your database server to have.