As an organisation we had the need to replace an old NT 4 Server running as a proxy for several overseas sites. It was decided to go for Squid, on a Linux box, distribution not initially decided. Company wanted some system with failover, so that if one server went down, another would automatically step in and take over the role. We needed a tool that would function over just a network connection, as the Servers would each be in different locations, although in the same site. After looking around the heartbeat tool was chosen. On paper it seemed very much to fill the function of swapping services between servers. Then we needed to chose a distro to run it on.
Initially was a bit hesitant as it seemed purely a text editing job. No real GUI to use for setup. On investigation realised that there was a GUI available with the SuSe, now Novell distribution. So installed SuSe on two Servers and went to use the GUI. Must admit to finding it a bit confusing So did a bit more reading of how the text files needed to be set up and found it not difficult at all. Like many an old Windows person, had a bit of an aversion of the command line and configuration text file editing. However, was pleasantly surprised. The two main files we edited are below:
bcast eth0 keepalive 2 warntime 10 deadtime 30 udpport 694 auto_failback on node msquid01 node msquid02 ping 10.182.64.119 respawn hacluster /usr/lib/heartbeat/ipfail
msquid01 10.182.64.47 squid
We found the following a good introduction to Linux High-Availability, which should explain our chosen settings in a bit more detail - http://www.linux-mag.com/2003-11/availability_01.html
Once the above files were in place, we rebooted the Servers. Once rebooted, login as normal user and checked that the heartbeat and squid services are both running. And they were. Users were able to browse the web okay, using the virtual IP address. So, now the test. We did a ssh to the virtual IP and ended up logging in the main Server, which was what was expected. We then powered down the main server and users were able to continue browsing the web. We did another ssh to the virtual IP address and this time ended up on the backup server, which again was expected. Failover was working okay.
The above article recommends using serial connection, as well as Ethernet, but due to differing locations that was not possible in our case.
Another reason, we chose heartbeat, was the cost. Although we had to purchase SuSe we felt it was a cost saving compared to another major Linux distos that used their own failover tool. To save even more cost you should be able to use Debian or other "free" distros.