This topic describes how to switch primary and standby instances. When the primary instance is unavailable, you can switch the standby instance to the primary instance to take over the Binlog service.
In OCP, you can switch primary and standby instances in the following two ways:
- Method 1: Go to the Binlog Cluster Overview page of a Binlog cluster, select the standby instance to be switched in the Binlog Instance List list, and click ... > Switch in the Actions column.
- Method 2: Go to the Binlog Instance Overview page of the standby instance, and click ... > Switch in the upper-right corner.
Prerequisites
You have logged in to OCP as a user who has the following permissions:
- The Binlog Service Maintenance permission.
- The Binlog Cluster Overview permission for the Binlog service.
The Binlog instance to be switched is a standby instance, and the Binlog cluster corresponding to the instance is in the Normal state.
Procedure
The following steps are based on Method 2.
Log in to the OCP console.
In the left-side navigation pane, click Binlog Service. The Clusters page automatically appears.
In the Clusters list, find the target Binlog cluster and click its name. The Binlog Cluster Overview page automatically appears.
In the Binlog Instance List section, find the standby instance to be switched, and click its name.
On the Binlog Instance Overview page, click ... > Switch in the upper-right corner.
In the dialog box that appears, select a switching method and click Switch.
- Switchover (recommended): New connections are established with the new primary instance, while existing connections remain on the original primary instance. This ensures uninterrupted access to the original primary instance.
- Downtime Switchover: This will interrupt access to the original primary instance, causing temporary unavailability for the business.
You can view the task progress in the Task Center. When the task status is Completed and the instance status is Running, the switch is successful.
