the right way to cluster fail-over da server

yoavz

Verified User
Joined
Jul 26, 2005
Messages
10
Hello.

I need to build a fail-over array for a big site using 2 dedicated servers.

My idea was to install the 2 systems using identical main features (apache version, sql version, php version etc) and to move any new files created from the main server to the slave server and to backup the db using mysqldump and to re-run it in the slave server.

this I can do using small bash scripts i can code by myself.

i'm also looking for an advanced way for syncing the 2 mysql servers.

the files is the easiest part.

ok, now to the failover part.

i only need 1 DA at a time. so i'll install both of the systems using the same license and i'll just swap the ip's.

when the main server is down, i'll just change the ip of the slave server to the main's ip. this way i shouldnt get any problems with dns and the clients shouldn't feel almost anything except for the swaping time - which shouldnt take more than a couple of minutes.

I need comments / advices for this method of fail-over array.

thanks alot,
-- yoav
 
If both machines are on the same local network you should be able to get MySQL replication to work. Google is your friend.

Jeff
 
Hello,

Yes, mysqldump would work for the databases, and I personally like rsync for keep files intact (it only does new/modified files saving you a lot of bandwidth). Rsync uses ssh, so all you have to do it setup/copy the keys and add a cron to transfer what you want. As Jeff mentioned, google will answer pretty much anything you can ask it ;)

John
 
I highly recommend googling for MySQL Replication and clicking on Feeling Lucky.

MySQL replication will work best for MySQL because it will keep the databases in sync, which is better than copying over databases, even with rsync, and perhaps trying to read something that isn't completely copied yet.

Jeff
 
Back
Top