The most common, basic configuration is that of a high-availability server which simply provides a single IP address (188.8.131.52) to be failed over between the nodes of our cluster. This is an ActivePassive configuration - the most basic configuration.
This is for Heartbeat 1.2.x
logfacility daemon # Log to syslog as facility "daemon" node paul silas # List our cluster members keepalive 1 # Send one heartbeat each second deadtime 10 # Declare nodes dead after 10 seconds bcast eth0 eth1 # Broadcast heartbeats on eth0 and eth1 interfaces ping 184.108.40.206 # Ping our router to monitor ethernet connectivity auto_failback no # Don't fail back to paul automatically respawn hacluster /usr/lib/heartbeat/ipfail # Failover on network failures
logfacility daemon keepalive 1 deadtime 10 warntime 5 initdead 120 # depend on your hardware udpport 694 ping 220.127.116.11 bcast eth0 auto_failback off node paul node silas respawn hacluster /usr/lib/heartbeat/ipfail use_logd yes
logfacility daemon keepalive 1 deadtime 10 warntime 5 initdead 120 # depend on your hardware udpport 694 ping 18.104.22.168 bcast eth0 auto_failback off node paul node silas use_logd yes compression bz2 compression_threshold 2 crm yes
If you want less broadcast traffic, use ucast, which is strictly peer-to-peer. bcast is limited to the logical segment and not routed, while ucast/mcast are potentially routed. ucast duplicates the packets, as it has to be sent to each node and not just broad/multicasted to all of them at the same time.
For Heartbeat version 2 with CRM, you'll need to modify cib.xml instead of this file. Please see the Basic Single IP address Configuration for version 2 page for details.
The first word (paul) on the line represents the "preferred" host for the service. The remainder of the line is the list of resources (services) which are part of this ResourceGroup. In this case, there is only one resource -- an IP address. This is a shorthand notation for IPaddr::22.214.171.124. There are many possible variants of how to specify the IP address, to learn about them, see the page on the IPaddr resource agent.
Note that this address cannot be used for anything else on these machines. In particular, it has to be controlled only by Heartbeat, and cannot be brought up by your operating system at boot time. We call this address a ServiceAddress - which is distinct from an AdministrativeAddress, like those brought up by your operating system.
auth 1 1 sha1 PutYourSuperSecretKeyHere