Failover IP router

brad at bradandkim.net brad at bradandkim.net
Tue Nov 27 21:49:56 UTC 2007


> I have been googleing for this, but can't seem to find the right answer.
> What I am trying to do is to create a failover router on a redhat box.
> 1.  website.com will be on 2 servers
> 2.  website.com has one IP address
> 3.  redhat box router will have the 1 IP address for website.com on it.
> 4.  website.com server1 will be on 192.168.1.10
> 5.  website.com server2 will be on 192.168.1.11
> 6.  If website.com server1 fails, website.com server2 will take over.
>
> We are not worried about cookies that have been set on server1 to be moved
> to server2.  We are just worried about the second machine taking over.
> What
> would be better is if it could be a load balancing setup so that it will
> use
> both servers, but if one fails, people will not notice it because the
> other
> server will then be taking all of the requests.
>
> I have googled for "Linux failover iptables router" and a few other
> combinations of words, but what I keep finding is failover for the
> outbound
> connections.  Having 3 Nic cards 1 going to one ISP, 1 going to another
> ISP
> and one going to the internal network.  Maybe I am just using the wrong
> wording.  Any url links for instructions would be appreciated.
>
> Thank You
> Steve

It looks like you are trying to use the router to perform the failover. 
Another approach would be to use RHEL Cluster Suite and configure it with
the 2 servers (leave the router out of it).  Going this route the 2
webservers will talk to each other with a heartbeat and if the active
server fails, the passive server will detect this and stop the primary
server, take over the IP address and begin serving the content.  The
cluster suite also supports load balancing but I have not used it.

http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Cluster_Administration/index.html

Another option would be to use something like pound for software load
balancing.  You could run pound on the router and have it listen on the
website's public IP and then forward requests to the 2 backend web servers
based on a number of algorithms.  It will detect a failed server and stop
sending requests to it.  I am sure the cluster suite load balancing works
in a similar manner.

http://www.apsis.ch/pound/

Brad Crotchett
brad at bradandkim.net
http://www.bradandkim.net




More information about the redhat-list mailing list