dscontrol highavailability
You can control high availability functions with the dscontrol highavailability command.
Syntax
Parameters
- backup
- Specify information for either the primary or backup machine.
- add
Defines and runs the high availability functions for this machine.
- primary
Identifies the Dispatcher machine that has a primary role.
- backup
Identifies the Dispatcher machine that has a backup role.
- auto
Specifies an automatic recovery strategy, in which the primary machine will resume routing packets as soon as it comes back into service.
- manual
Specifies a manual recovery strategy, in which the primary machine does not resume routing packets until the administrator issues a takeover command.
- port
An unused UDP port on both machines, to be used by Dispatcher for its heartbeat messages. The port must be the same for both the primary and backup machines.
- primary
- delete
Removes this machine from high availability, so that it will no longer be used as a backup or primary machine.
- add
- heartbeat
- Defines a communication session between the primary and backup Dispatcher machines.
- add
Tell the source Dispatcher the address of its partner (destination address).
-
source_address
Source address. The IP address or hostname of this Dispatcher machine.
- destination_address
Destination address. The IP address or hostname of the other Dispatcher machine.
-
source_address
- delete
address
Removes the specified heartbeat information. You can specify either the source_address or destination_address of the heartbeat pair.
- add
- reach
- Add or delete an address for the Dispatchers to monitor. Reach targets are optional and not
required for high availability. The reach target can be defined as any device that is critical for
Load Balancer to communicate with clients. Both Dispatchers must define the same target.
- add
address
Adds a target address for the reach advisor. The address field is the IP address or hostname of the target node.
- delete
address
Removes a target address from the reach advisor. The address field is the IP address or hostname of the target node.
Avoid trouble: If reach targets are defined, the manager must be running to monitor the status of reach targets. - add
address
- status
- Return a report on high availability. Machines are identified as having one of three status
conditions or states:
- Active: A given machine (either a primary, backup, or both) is routing packets.
- Standby: A given machine (either a primary, backup, or both) is not routing packets; it is monitoring the state of an active Dispatcher.
- Idle: A given machine is routing packets, and is not trying to establish contact with its partner Dispatcher.
- takeover
-
Takeover forces the standby Dispatcher to become active and to begin routing packets. The takeover command is only accepted when the high availability strategy is manual and the Dispatcher is in the standby state.Note:
- The high availability roles of the Dispatchers (primary and backup) do not change. Only their current high availability state (active or standby) changes.
- There are three possible takeover scripts, goActive, goStandby, and goInOp. These scripts can be customized. For more information about these scripts, see Scripts to run with high availability.
Samples
- To check the high availability status of a
machine:
dscontrol highavailability status
- To add the backup information to the primary machine using the automatic recovery strategy and
port 80:
dscontrol highavailability backup add primary auto 80
- To add an address that the Dispatcher must be able to reach:
dscontrol highavailability reach add 9.67.125.18
-
To add heartbeat information for the primary and backup machines
Primary Dispatcher:
dscontrol highavailability heartbeat add 9.67.111.3 9.67.186.8
Backup Dispatcher:
dscontrol highavailability heartbeat add 9.67.186.8 9.67.111.3
- To tell the standby Dispatcher to become active, forcing the active machine to become standby:
dscontrol highavailability takeover