Reroute traffic between two web servers
Posted on 2013-11-21
I have two self hosted public web servers. One is my live site, and the other is a minified site that I also use to reroute the traffic to it when I have my live site under maintenance.
My firewall is a cloud hosted firewall. The way I do things now is when I want to take the live site down and re-route to the backup site, I send a request to the cloud hosted firewall people and they do the switch for me. The whole process take about 10-15 minutes. And when I want to go back live. I send in another request and wait another 10-15 minutes.
The problem is that, just switching back and forth is a good 30 minutes! I want to be able to do the switch almost instantly!
How can I go about having it so that. If the main web server is down, All the traffic goes to the backup webserver and vice-versa? Or if there is a way that I can switch between both servers on-demand?