This topic describes how to manually modify the primary zone of a tenant in 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 leader replica resides is called the primary zone.
Background information
OceanBase Database provides a multi-zone high availability cluster. The zone that provides read and write services is the primary zone, while the others are read-only or backup zones. When the primary zone fails, OceanBase automatically switches the primary zone to a new one to ensure database services remain available. You can also manually initiate a primary zone change, specifying one or more zones as the new primary zone. This distributes the leader replicas across multiple zones, optimizing resource utilization and performance.
Considerations
For Alibaba Cloud instances, you cannot change a tenant's primary zone while the tenant has both an original private connection address and a Private Link endpoint. First switch your applications to the Private Link endpoint, then delete the original private connection address after verifying that it is no longer in use. For more information about migration, see MySQL mode guide and Oracle mode guide.
If the proxy primary zone is different from the data primary zone, there is a risk of data latency.
If there is a direct connection address, only one primary zone can be selected.
If the proxy primary zone is different from the data primary zone, it will result in cross-region traffic forwarding, potentially increasing SQL response time.
After switching the "proxy primary zone", there will be about 30s of interruption, and the virtual IP address will change. Please use the connection address to connect to the database in your application, and do not use the IP address.
Changing the virtual IP address will briefly affect database availability. Please refresh the console and obtain new connection information in a timely manner.
Changing the virtual IP address will also affect the use of developer tools and data migration tools. Please make sure to use the latest virtual IP address in the tool's 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 the instance name to go to the Overview page of the instance.
On the left, click Tenants. In the tenant list, click the More icon in the row of the target tenant, and then select Modify Primary Zone.
In the popup window, select the target primary zone.
Note
- Tenants in an instance deployed in a single IDC cannot change their primary zone.
- Tenants in an instance deployed in two IDCs can change their primary zone, and can select 1 to 2 primary zones.
- Tenants in an instance deployed in multiple IDCs can change their primary zone, and can select 1 to 3 primary zones.
Click OK.