Redundant Web servers

Richard Pieri richard.pieri-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Dec 15 01:36:04 EST 2009


On Dec 14, 2009, at 6:39 PM, Daniel Feenberg wrote:
> 
> A plan to improve web server availability:

Using DNS Roulette (Round Robin) for failover is not a new idea.  It is a bad one.  Not all resolvers work the way you expect.  Some will cache data and not cycle through the list.  Some sort results to give closer nodes priority.

A better idea is to implement a simple failover mechanism with virtual IP addresses.  Given 2 nodes on a shared network.  Each server has a virtual IP address on the external network.  The virtual IP addresses are recorded in DNS.  Each node runs a script that regularly (every 30 seconds, for example) attempts to ping the other node's real IP address.  If the ping check fails then it assumes the other node is down and takes on that virtual IP on its external interface.  This is a very simple, quick-and-dirty HA cluster.  Refinements can be made to provide a quorum mechanism to prevent cluster splits, to scale beyond 2 nodes, and to enable automatic virtual IP recovery when a fault is cleared.

--Rich P.







More information about the Discuss mailing list