This topic describes how to manually modify the primary zone of a tenant through the OceanBase Cloud console.
Concepts
Primary zone: In OceanBase Database, data replicas of the same partition are distributed across multiple zones. The zone where the partition's primary replica resides is called the primary zone.
Background information
OceanBase Database provides high-availability instances with multiple zones. The zones that provide read and write services are the primary zones, while others are read-only or backup zones. When a primary zone fails, OceanBase services automatically switch the primary to a new zone to ensure database services remain available. You can also manually initiate a change of the primary zone, designating one or several zones as the new primary zone. This disperses the leader replicas across multiple zones to fully utilize machine resources and improve performance.
Considerations
If the zone of the primary address proxy is inconsistent with the data primary zone, there is a certain risk of data latency.
If a direct connection address exists, selecting multiple zones may increase access latency for that address. It is recommended that applications originally using the direct connection address switch to use the primary address or access endpoint.
If the zone of the primary address proxy is inconsistent with the primary zone, cross-IDC traffic forwarding occurs, which may increase SQL response time.
When switching the "primary address proxy zone," there will be a brief disconnection of about 30 seconds during the process, and the virtual IP will change. Please use the connection address in your application for connection, not the IP address.
The change of the virtual IP will briefly affect database availability. Please refresh the console promptly and obtain the new connection information.
The change of the virtual IP affects the use of developer tools and data migration tools. Please ensure the latest virtual IP address is used in the tool connection information.
Procedure
Log in to the OceanBase Cloud console.
In the left-side navigation pane, click Instances.
In the instance list, find the target instance and click its name to enter the instance workspace.
Click Tenants on the left. In the tenant list, click the more icon in the row of the target tenant, then select Modify primary zone.
In the pop-up window, select the target primary zone.
Note
- Tenants under cluster instances deployed in a single IDC cannot have their primary zones switched.
- Tenants under cluster instances deployed in dual IDCs can have their primary zones switched. You can select 1-2 primary zones.
- Tenants under cluster instances deployed in multi-IDCs can have their primary zones switched. You can select 1-3 primary zones.
Click OK to complete the modification.