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 leader replica resides is called the primary zone.
Background information
OceanBase Database provides a multi-zone high availability cluster. The primary zone is responsible for providing read and write services, while other zones serve as read-only or backup zones. When the primary zone fails, OceanBase automatically switches the primary zone to a new one to ensure database availability. 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
If the proxy primary zone is different from the data primary zone, there may be some data latency.
If there are direct connection addresses, specifying multiple zones may increase the access latency for direct connection addresses. It is recommended to switch applications originally using direct connection addresses to use primary or access addresses.
If the proxy primary zone is different from the primary zone, it will result in inter-zone traffic forwarding, which may increase the SQL response time.
After updating the "Proxy Primary Zone", there will be about 30s of interruption, and the virtual IP will change. Please use the connection address to connect to the database in your application, and do not use the IP address.
The change of virtual IP will briefly affect the database availability. Please refresh the console and obtain the new connection information in time.
The change of virtual IP 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 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.
Click the
icon in the right-side action list and select Modify Primary Zone from the menu.In the pop-up window, select the target primary zone.
Note
- Tenants of cluster instances deployed in a single IDC cannot modify the primary zone.
- Tenants of cluster instances deployed in two IDCs can modify the primary zone, and can select 1 or 2 zones as the new primary zone.
- Tenants of cluster instances deployed in multiple IDCs can modify the primary zone, and can select 1 to 3 zones as the new primary zone.
Click OK.