next up previous
Next: ha.cf Up: High Availability Mail Server Previous: drbd.conf

HA and heartbeat

High Availability Linux works by using IP aliasing to provide services and heartbeat to track the active server. Both servers have one IP address apiece and a second IP alias address they share. The primary server has the aliased IP address active while the secondary server is inactive. When the heartbeat from the primary host fails, the secondary assumes the primary to be dead. It then brings up the shared IP alias and starts the services the two servers share. There is a short delay while the secondary server comes up. To a client using the cluster this appears to be a momentary server failure. DRBD lengthens the delay slightly while the mirrored drive is mounted.

Heartbeat is the facility of High Availability Linux that allows the secondary server to know whether the primary server is active. It does this by sending a ``ping'' from one to the other server at a predetermined interval. There is an option to run heartbeat over either serial or ethernet connections between the two servers. Since the motherboards have dual ethernet and DRBD is to run over a crossover cable on one of these interfaces, we decided to use the ethernet interface for heartbeat also. Heartbeat over ethernet essentially ``pings'' a specified port at a specific interval using UDP. If the secondary machine fails to receive those packets for a configurable ``deadtime'' it takes over the shared IP alias address and brings services on-line.

There are two essential configuration files in /etc/ha.d, ha.cf and resources. Ha.cf is the master configuration file and resources tells Linux-HA which services to bring up when it assumes the high availability resources



Subsections
next up previous
Next: ha.cf Up: High Availability Mail Server Previous: drbd.conf