If you deploy two App Controller virtual machines (VM), you can deploy them in a high availability configuration. You configure one App Controller VM as the primary role and the other VM as the secondary role. In this deployment, the primary App Controller VM listens for requests, and serves user requests. The secondary VM synchronizes its data with the data on the primary App Controller VM. The two VMs work as an active-passive pair, in which only one VM is active at a time.
If the current primary App Controller VM stops responding for any reason, the current secondary App Controller VM takes over and becomes the active VM. The new primary App Controller begins to serve user requests.
You configure each instance of App Controller with an individual IP address. Each App Controller in the pair is also assigned with the same virtual IP address, which is used by the active App Controller. Users connect to the primary App Controller VM by using a fully qualified domain name (FQDN) that resolves to the virtual IP address.
In App Controller 2.8, you use the Console tab in XenCenter or a Secure Shell (SSH) client, such as PuTTY, to prepare two App Controller VMs for high availability. When you configure high availability, you configure the following settings:
How App Controller High Availability Works
When you configure App Controller for high availability, the two virtual machines (VMs) communicate by using port 9736. Each VM in an App Controller high availability pair generates a heartbeat message at one second intervals. You can view the status of the VMs by using the App Controller command line. The heartbeat service running on the two VMs monitors the health of each App Controller system and the health of the high availability pair.
If the primary App Controller VM fails for any reason, the secondary VM immediately takes over as the primary VM. If the active VM does not respond or reports a failure, the passive VM acquires the virtual IP address and becomes active.
When the failed VM comes back online, it joins with the current active VM and becomes the passive VM. The passive VM then synchronizes with the data from the active VM.
Before you configure an high availability pair, do the following:
- Install the same build version for each App Controller virtual machine (VM).
- Install both VMs in the same network subnet.
- Assign IP addresses from the same subnet to each VM in the pair.
The basic steps for configuring high availability are as follows:
- Identify which VM is the primary role and which VM is the secondary role.
- Configure the virtual IP address, the peer IP address, and shared key on the primary VM.
- When you finish configuring high availability on the primary VM, configure the peer IP address and shared key on the secondary VM.
To prepare each VM for high availability in App Controller 2.8, you use the command-line console to configure the settings. You can log on to the command-line console by using the Console tab in XenCenter or vSphere. You can also log on to App Controller by using a command-line tool, such as PuTTY. You must enable SSH in App Controller to use PuTTY.
To configure the secondary App Controller
- Log on to the secondary App Controller by using the command line.
- At the command prompt, press 1 to enter high availability and then press ENTER.
- At the command prompt, press 1 and then press ENTER to set the VM role preference as the secondary.
- At the command prompt, press 2 and then press ENTER to set the peer IP address and shared key.
Make sure the shared key matches with the one configured for the primary.
- Press y to commit the changes.
- At the command prompt, press 3 and then press ENTER to enable high availability.
When you configure high availability on for the primary App Controller VM, the option to force failover to the secondary VM appears.