Hi, I'm hoping that someone could help me with finding a solution for the infrastructure we have in place. We have several servers hosted on 2 sites, Site A and Site B. Both sites is independant of each other, ie. separate entities with separate IP addresses. What we have planned is to have Site A to be the primary site while Site B will be the backup site. So basically, if Site A goes down due to whatever reasons, all traffics to domains owned by us will be automatically redirected to Site B. Someone suggested using the Primary and Secondary DNS to point to the 2 sites, but I don't think that would be a good solution as most ISP cache theirs and the failover would not be immediate. So do anyone have any solutions as to how we can best overcome this. Thanks.
Well, in the past, I used http://www.dnsmadeeasy.com 's DNS Failover service which works quite nicely for this. It will ping your existing site and if it fails, it will do a switchover to your mirror site and when your master site comes back on, it will switch back. It basically works great for me and no one noticed a downtime apart from a few seconds during the switchover.
Well, the database would be the tricker part. I believe when everything is up, you need to sync to both sides.
Actually you can't have 2 MySQL servers in a Load Balancer cause each of them could be read or updated and that would create a mess. You must use only 1 database server, if you want you can use replication (rsync is not a very good idea for live database servers) to have an identical database server in case the first one crashes. But in any case, database servers are never inside the loadbalancer.
The solution to the database part is MS SQL SERVER. Look up the "not for replication" clause in books online. As for the actual failover, outside of redundant hardware load balancers, you are pretty well limited to editing dns and setting the ttl to something short, like 300 seconds. . .