A challenge I faced recently was "scaling up on demand" (without manual intervention). EC2 was the my platform of choice because I could write a small script to manage all my machines. EC2 being Xen based also allowed me to create custom images of my application servers.
- Hook into the load balancer's health monitor
- If the load goes over 70% launch a new ec2 instance
- If the load goes under 50% remove an instance
Example:
- @ 7am - 2 servers
- @ 1pm - 4 servers
- @ 6 pm - 3 servers
- @ 9 pm - 2 servers
I have a base of 2 machines, and no real limit set to the maximum number of ec2 machines that can launched. The script is set to send me a mail every time a new machine is launched or terminated.
Now I am trying to automate creation of MySQL Slaves

Comments
That's really cool! What
That's really cool! What site are you using this on, can you share the script?
Would you mind posting
Would you mind posting samples of the scripts? I am sure that others (like me) would find them useful.
Thanks!
where is your load balancer
where is your load balancer in this scenario? another EC2 box? or did you rent/host a hardware load balancer somewhere nearby?
Post new comment