All Products
Search
Document Center

PolarDB:Three availability zones

Last Updated:Jun 20, 2026

This topic describes how to perform a primary/secondary switchover for an instance that spans three availability zones and resolve primary zone misalignment issues.

Create a three-zone instance

When you create a PolarDB-X instance, you can set the Deployment Topology to Three-Zone Deployment or Single Zone. Select Three-Zone Deployment to create an instance deployed across three availability zones. For more information, see Create an instance.

View availability zone information

After creating an instance, you can view its availability zone information on pages related to the instance.

  • Instance list page

    On the instance list page, the "Availability Zone" column displays the details of the primary and secondary zones for multi-zone instances.

    For example, for a multi-AZ instance, the Availability Zone column displays the primary and secondary availability zones in the format 'Availability Zone (G+H)'.

  • Instance details page

    On the Basic Information page of an instance, the availability zone information is the same as on the Instance List page and includes details for both the primary and secondary zones.

  • Instance topology page

    On the instance topology page, you can view the availability zone and status of each node.

    In the navigation pane on the left, click Basic Information. Then, scroll to the Topology information section to view the zone distribution of nodes. For example, compute nodes might have a master node in cn-hangzhou-g and a standby node in cn-hangzhou-h. Data nodes and metadata nodes might have a leader in cn-hangzhou-g, a follower in cn-hangzhou-h, and a logger in cn-hangzhou-i. All log nodes might be located in cn-hangzhou-g. To switch the primary zone, click the Specify Primary Zone button in the upper-right corner.

Specify the primary zone

  1. Log on to the PolarDB-X console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. On the Instances page, click the PolarDB-X 2.0 tab.

  4. Find the instance that you want to manage and click its ID.

  5. On the Basic Information page, go to the Topology Information section and click the Specify Primary Zone button.

  6. In the Specify Primary Zone dialog box, select the availability zone that you want to set as the new primary zone, and then click OK.

    Important

    A primary/secondary zone switchover causes transient connections, so we recommend performing this operation during off-peak hours.

    In the Specify primary zone dialog box, select the target availability zone from the Primary zone drop-down list. Set Switchover mode to Switch immediately or Switch within maintenance window, and then click OK.

    After the instance status briefly changes to HA Switching, the switchover between the primary and secondary availability zones is complete.

FAQ

  • Q: After creating an instance that spans three availability zones, I noticed that some compute nodes are inactive and have the standby role. What is the purpose of these nodes in a three-zone disaster recovery setup?

  • A: An instance that spans three availability zones has a defined primary zone. The system aligns the compute and storage nodes with this primary zone whenever possible. The master role signifies a compute node in the primary zone, while the standby role signifies a node in a secondary zone. In the event of a zone-level failure, you can quickly switch over to the secondary zone, allowing the standby compute nodes to take over the workload. On the Basic Information page of the instance, in the Topology Information section, click Specify Primary Zone. In the Specify Primary Zone dialog box, select the current primary zone ID (in other words, do not change the primary zone), and click OK. This action changes the role of compute nodes in the former secondary zone from standby to master.

  • Q: Due to their built-in high availability (HA) capabilities, data nodes can sometimes become misaligned. This means the primary zone of a data node group might not match the primary zone of the instance. In the data node list within the Topology information section, if the values in the Leader AZ column are inconsistent (for example, one is cn-hangzhou-h and another is cn-hangzhou-g), this indicates a misalignment, which you can correct with the Specify Primary Zone feature.

  • A: On the Basic Information page of the instance, in the Topology Information section, click the Specify Primary Zone button. In the Primary Zone drop-down list, select the current primary zone ID (in other words, do not change the primary zone) and click OK. The instance status temporarily changes to HA Switching. When the process is complete, the system aligns all data nodes and metadata services with the primary zone.

    Important

    This realignment process causes transient connections, so we recommend performing this operation during off-peak hours.