Posted by sugiggs on January 15, 2011 at 2:42am
Hi All,
I'm thinking of an idea but not sure the pros/cons of it.
At the moment, we are hosting our website on a dedicated server. As a failover/load balanced solution, I'm thinking to use Amazon EC2+EBS.
The files can be rsync and mysql can be setup as master-master replication
When the load is high, I can up the machine, given sometime to "sync" and load balanced the traffic there.
is it do-able? any link I can read more on this?
Comments
Yes
Should be doable without an issue. If cost is an issue, you may want to look at the micro instances. The key there is they support a 64bit OS and are extremely cheap to keep running 24x7. In your case you probably only need the OS and the DB running, no webserver or anything else. Just replicate your SQL to that instance (assuming it can handle the load) and if you are looking for easy just use rsync. If you want to get fancy you could always look at a distributed filesystem like GFS.
The idea is when you need to spin up a 'real' machine, you can just reboot from a micro instance into a large instance with the same OS and kernel. Then you keep them replicated live, paying very little, and are positioned to grow when you need to.
I do something very similar, except I replicate back to my own network and Xen instances.
Hi rjbrown99, Thanks for
Hi rjbrown99,
Thanks for replying.
Do you set up master-master Mysql replication?
-sugiggs-
Pressflow
I'm using Pressflow:
https://wiki.fourkitchens.com/display/PF/Using+database+replication+with...
In the event of failover, the slave would be promoted:
http://www.pythian.com/news/300/mysql-recipes-promoting-a-slave-to-maste...