Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to web development and design (I moved over from construction where answers are much larger), and I'm trying to build a scalable AWS architecture for a Wordpress site that lives in the free tier but will ramp up to meet demand. Is there a single EC2 instance solution to have my web servers autoscale and clone so that changes propagate throughout the tier, without having to manually update each instance?

My search has put me on nginx and heartbeat or corosync as possible software solutions, but I really don't know where to look to implement this on the cheap.

EDIT: now looking to rsync and incron, but will having all server instances push changes out cause an infinite loop on change?

share|improve this question
This is a pretty big project for someone new to webdev. – ceejayoz Apr 7 '13 at 15:49

Give yourself a "Gold" instance whose sole purpose is to update your website. When you do a site update, run the instance, update your site, stop the instance, then make a fresh AMI image of the instance.

Once you do that, update your autoscaling group to launch copies of that new AMI image. Terminate instances that are using the old AMI image.

This way, you only update a single instance.

share|improve this answer
Where is the database stored? And how does it scale? – Ladadadada Apr 7 '13 at 17:28
Database will be served out of RDS and object-cached in Elasticache. Scaling with Wordpress plugin and master/slave set-up as necessary. – crockett95 Apr 8 '13 at 11:31
If you are autoscaling, then our database should be somewhere that's not autoscaled. Scaling databases requires using their own built-in mechanisms (clustering, replication, etc.) and should not be done using autoscaling. – Matt Houser Apr 8 '13 at 13:56
Thanks, I'm expecting caching to eliminate the need to scale the database server, but will do so manually if necessary. Also, would a viable setup be to build (all behind my load balancer) an always-on "master" server instance outside the auto-scaling group, and auto-scaling instances (0 to however many are required) running incron and rsync to push changes to the master and using cron and rsync to pull changes from the master? – crockett95 Apr 8 '13 at 15:36

Is there a single EC2 instance solution to have my web servers autoscale and clone so that changes propagate throughout the tier, without having to manually update each instance?

There are a number of options available but it's hard to give you a 'correct' solution without much more information.

You can use professional tools to manage each operating system, such as Puppet or Chef. These allow you to keep all of your Server Configuration in code, and deploy changes out to one or more machines.

For your application code, you could store it in a repository (git or svn) and depending on how you'd like to manage your deployment process you could automate your servers in such a way that when you check-in in code it causes all the servers to be updated. The command in SVN would be 'svn up'.

Of course these options might not be the best fit for you, it's all depends on what you're trying to achieve, and how you want to achieve it.

With this sort of solution you can make a copy of the server at any point in time, register it with AUTO-SCALE and when the machine comes up it will bring itself up to date. You can update the snapshot from time to time to make things quicker but it's not completely necessary to have it up to date with each and every change.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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