Saturday , 22 October 2016
Breaking News
Home » WWW » The names define the context of when the scripts will run

The names define the context of when the scripts will run

About the Failover Scheme

A failover scheme has two parts. On the master, the IPFailover startup item (/System/ Library/StartupItems/IPFailover) launches heartbeatd during startup. Upon launch, heartbeatd checks its argument list, and moves to the background. heartbeatd sends out a message every second via port 1694. This is the signal to the backup server in the failover pair that the primary is still alive and well (or can at least get a heartbeat signal out).

These messages are directed at the address specified in the FAILOVER_BCAST_IPS entry in the /etc/hostconfig file. On the backup server, the IPFailover startup item starts failoverd, which listens for the heartbeat message on port 1694. If it stops receiving the heartbeat message, it begins the failover process.

On detecting a failure, failoverd takes over the master host’s public IP addresses, to maintain service availability to incoming clients. failoverd also invokes NotifyFailover to notify the administrator by email, and ProcessFailover to acquire the monitored IP. (See the following illustration.)

The ProcessFailover script also executes scripts located in the /Library/IPFailover/<IP_ Address> folder, where IP_Address is the address of the primary server. You must create this folder; it does not exist by default. This folder can contain four scripts: PreAcq, PostAcq, PreRel, and PostRel. These scripts perform actions you determine at each stage of a failure.

The names define the context of when the scripts will run (before IP acquisition, after acquisition, before IP release, or after IP release). The capability of customizing actions for their specific configuration is where the real power and flexibility of IP failover comes into play.

About Emma G.

Working in the marketing industry since 2002. This blog is one of my hobbies.

Leave a Reply