How to manage server states
- Scenario 1: Failed Active Primary
- Scenario 2: HA Split Brain
- Scenario 3: Failed Standby Secondary
- Scenario 4: Both HA Servers Fail
Scenario 1: Failed active Primary
This scenario illustrates a BAU HA Pair against a failed active Primary. When an active Primary fails the server maybe offline or still online but not working correctly. When a active Primary goes offline, it can't be demoted. An active Primary that is still online but is having issues can still be demoted when you failover to the standby server. There is no database replication during this period.
To recover a HA Pair from a failed active Primary will require the following steps:
-
On the standby Secondary server run
ha-failover
command. The standby server will be promoted to active and the Primary demoted if it is available. -
Deploy and configure a new PAM Server as a replacement Primary server.
-
On the Secondary server run
ha-failback
command. The Primary will again become the active Primary server and the Secondary will be demoted back to standby. Replication will restart between the Primary and Secondary.
For detailed instructions on how to recover from a failed Primary, click here.
Scenario 2: HA split brain
This scenario illustrates a BAU HA Pair against a split brain. A HA Pair can end up in a split brain scenario if both servers in the HA Pair have a status of active. There is no database replication during this period.
To recover a HA Pair from a split-brain scenario will require the following steps:
-
On the Primary server, run the
ha-demote-primary
command. The Primary server will be demoted and will be on standby. -
On the Secondary server, run the
ha-failback
command. The Primary will become the active server again and replicate to the Secondary. The Secondary server will be demoted back to standby.
Note
If any configuration changes were made on the Primary they will be lost when the failback command is run on the Secondary.
Scenario 3: Failed standby Secondary
This scenario illustrates a BAU HA Pair against a failed standby Secondary. When a standby secondary fails, there is no database replication but users can continue as normal.
To recover a HA Pair from a failed standby Secondary will require the following steps:
-
Deploy a new PAM Server as HA Secondary.
-
On the Primary server, run
ha-initialise
and configure the new Secondary server details to create the HA Pair. The joining code of the Secondary server will be required which can be found on the console window. -
Secondary set to standby.
Scenario 4: Both HA servers fail
This scenario illustrates a BAU HA Pair against both HA servers failing at the same time. In this case the Primary server will have to be restored from a backup file.
To recover a HA Pair from a failed Primary and Secondary will require the following steps:
-
Deploy two PAM Servers.
-
During the configuration of the first server, select the Restore a backup installation type. The HA MEK will be required. This will become the Primary server.
-
Configure the second server as a HA Secondary.
-
On the Primary server
ha-initialise
to recreate the HA-Pair. The Primary server will be set to active. The Secondary server will be set to standby.