When the primary instance becomes unavailable due to planned or unplanned downtime (e.g., a majority replica failure), you can switch the standby instance to the primary instance to take over the services. This topic introduces the procedure for performing the primary-standby instance switchover.
Prerequisites
Before proceeding with the switchover, ensure the following conditions are met:
Both the primary and standby instances are in a running state.
Note
- The switchover process takes approximately 5 minutes and may cause a brief interruption to services. It is recommended to perform the switchover during off-peak hours.
- Once the switchover is complete, the original primary instance will become the standby instance. The information displayed on the primary instance's overview page will now reflect that of the standby instance.
Your account role must be Project Admin or Instance Admin.
You can only perform a primary-standby instance switchover within the same cloud.
Considerations
- If global endpoints are configured for tenants in the primary and standby instances, the system updates these endpoints during the switchover. It then restarts the ODPs associated with those tenants on the original primary instance to close existing connections. Other existing connections that share these ODPs may also be disconnected.
- Make sure your client or connection pool can reconnect after the switchover completes. New connections through the same global endpoint are then routed to the new primary instance. Existing sessions are not migrated to the new primary instance.
- If none of the tenants involved in the switchover have a global endpoint configured, the ODP restart described above is not performed.
Procedure
Log in to the OceanBase Cloud Console.
From the left-side navigation pane, click Instances.
In the list of instances, find the target standby instance, and click the instance name to enter the Overview page of the instance.
In the upper-right corner, click the More icon and select Switch to Primary Instance.
In the confirmation dialog, enter switchover and click Switch.
Note
- After the switchover, the Binlog feature will no longer be available on the original primary instance. You will need to re-enable Binlog on the new primary instance's **Overview** page of the tenant. Please proceed with caution.
- After the switchover completes, new connections through the same global endpoint are routed to the corresponding tenant on the new primary instance.