I'm working on a multi-site app targeted to run fully Amazon Web Services. Due to its nature, it will have significant traffic spikes, followed by long periods of low traffic, so the ability to scale EC2 instances is a must have.
So far the structure I have in mind is:
_____________________
Elastic Load Balancer
_____________________
|
V
_____________________
[] [] [] [] [] [] []
Autoscaling EC2
With Dynamic Virtual
Hosts
Global Business Logic
_____________________
/ | \
/ | \
Amazon RDS S3 Site Views?
One Per Site for
static files
Now, I have two questions:
- Where should I keep the site-specific "views" or "theme" files? Is S3 fast enough to handle these? Or should I really create new AMIs every time I need to tweak a particular site's theme?
- Configuration Files. Since each site connects to a separate Database, they each need their own configuration files. Again, should I store these on S3, and all EC2 instances check S3 for updated configs every now and then?
I feel there is some missing link I'm not aware of. What I've mostly seen is people advising you create a new AMI, and shut down the current instances and replace them with new ones. This seems like a heavy burden, especially in a multi-site structure where those changes could be specific to only a single site. Is there a preferred method of handling these kinds of code changes?