Website failover

Willem Kossen w.kossen at quicknet.nl
Wed Jul 21 09:18:39 UTC 2004


 >"John" <john.vanLit at ratio-it.nl> wrote in message
 news:faa10916.0407200315.71aeb3f6 at posting.google.com...
 >all,
 >
 >I have two web servers server A and server B. both servers host the
 >same web application. Server B is the slave server off server A. both
 >servers are located on different places. How can I configure DNS so
 >that a www request always goes to the primary server A but when server
 >A is offline the same request goes automatically to server B?
 >
 >Regards,
 >
 >John van Lit
 
 If you don't want to pay a lot of $$ you may trie the following which is a
 bit ugly, but works:
 use one or more linux hosts with iptables as frontend (have dns point to
 them). the linux iptables will than redirect (DNAT) the traffic on port 80
 to your server A. You run a script that will ping server A every couple of
 seconds. If a few pings fail, you will simply update the iptables rule to
 redirect to server B from the script. You also have the script send you an
 email telling you server A is down.
 The script continues to ping server A and when it's up again it will (a
 minute or two later to allow it to fully startup) change the iptables rule
 so that redirection goes to server A again.
 
 lowcost failover
 
 Willem Kossen
 
 
> 


More information about the bind-users mailing list