All Products
Search
Document Center

PolarDB:Create a multi-zone cluster and change the primary zone

Last Updated:Mar 28, 2026

PolarDB for PostgreSQL supports multi-zone cluster deployment to protect against zone-level failures. Three high-availability (HA) modes are available, each offering a different balance of cost, recovery speed, and read capacity in the secondary zone.

Choose an HA mode

ModeStorage HACompute HA in secondary zoneFailoverTypical use cases
Single-zone (hot standby storage cluster disabled)Primary zone onlyNoneLonger recovery timeDevelopment, testing, small applications
Dual-zone (hot standby storage cluster enabled)6 replicas across two zonesNone — compute stays in primary zoneStorage-level failoverProduction workloads — covers 80%+ of use cases
Dual-zone (hot standby storage cluster and compute cluster enabled)6 replicas across two zonesHot standby compute node (readable)Storage and compute failoverHigh-traffic or analytics-intensive enterprise workloads

For most production databases, use dual-zone (hot standby storage cluster enabled).

HA mode details

Single-zone (hot standby storage cluster disabled)

Database services run entirely from the cluster in the primary zone. This is the lowest-cost option, but recovery from a primary zone failure takes longer than multi-zone deployments. For cross-zone protection, switch to a dual-zone mode.

Switching rules: Can be switched to either dual-zone mode.

Scenarios:

  • Small websites and applications: Delegate routine O&M to Alibaba Cloud and focus on application development.

  • Learning and exploration: A cost-effective way to get started with PolarDB.

  • Development and testing: Fast provisioning and flexible scaling speed up development cycles.

image

Dual-zone (hot standby storage cluster enabled)

Data is distributed across the primary and secondary zones, with each zone storing three replicas — six replicas in total. This ensures a high service level agreement (SLA). Compute nodes remain in the primary zone. The hot standby storage cluster in the secondary zone handles failover when the primary zone fails.

Switching rules: Can only be switched to single-zone (hot standby storage cluster disabled).

Billing: Six replicas across two zones result in higher storage costs than single-zone.

Scenarios: Suitable for more than 80% of production workloads across industries such as Internet, IoT, online retailing, logistics, and gaming.

image

Dual-zone (hot standby storage cluster and compute cluster enabled)

Both storage and compute are replicated across zones. The secondary zone contains a hot standby compute node that can serve read traffic. After a failover, the hot standby compute node is promoted to the primary node.

Note

To use this mode, contact us.

Switching rules: Can only be switched to single-zone (hot standby storage cluster disabled).

Billing:

  • Compute nodes: When you purchase the cluster, hot standby compute nodes are added to the secondary zone. By default, their specifications match those of the primary zone. Hot standby compute nodes in the secondary zone are charged separately.

  • Storage: Six replicas across two zones result in higher storage costs than single-zone.

For detailed pricing, see Billing.

Scenarios: Large and medium-sized enterprises that need to handle high read throughput or run intelligent data analysis during peak hours — including financial institutions, online retailers, automobile enterprises, education providers, and Enterprise Resource Planning (ERP) service providers.

image

Multi-zone deployment architecture

The following diagram shows the architecture for multi-zone deployment solutions.

image

Requirements for multi-zone deployment:

  • The region must contain at least two zones.

  • The secondary zone must have sufficient computing resources.

Enable or switch the HA mode

At purchase: Select the HA mode in the Network and Zone section on the buy page.

Note

Available HA modes depend on the zones and resources in your selected region. See the buy page for current options.

image

After purchase: In the PolarDB console, go to the cluster's Basic Information page. In the Database Distributed Storage section, click Switch to HA Mode.

image

View the zones of a cluster

  1. Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region, then click the cluster ID.

  2. On the Basic Information page, view the Zones section.

image

Change the primary zone

For clusters using multi-zone deployment, you can migrate compute nodes to a different zone. This is useful for disaster recovery or to co-locate an Elastic Compute Service (ECS) instance with the cluster in a nearby zone.

Important

For a PolarDB for PostgreSQL cluster with hot standby enabled, you cannot change the primary zone after enabling tiered storage for cold data. To change the primary zone in this case, contact us.

  1. Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region, then click the cluster ID.

  2. On the Basic Information page, click Change Primary Zone.

    image

  3. Configure the Destination Zone, Destination vSwitch, and Effective Time parameters.

    Destination zoneMigration behaviorTypical duration
    An existing secondary zoneOnly compute nodes are migrated — no data migration~5 minutes
    A zone that is not a secondary zoneFull data migration required — Proceed with cautionVaries by data volume; may take several hours

    image

  4. Click OK to confirm.

Important

After the change, the primary endpoint and cluster endpoints remain unchanged. However, the vSwitch and IP address may change. Expect a service interruption of less than 60 seconds. Plan accordingly.

Create a read-only endpoint for the hot standby compute node

Note

You can create a read-only endpoint for the hot standby compute node when the high-availability mode is set to dual-zone (hot standby storage cluster and compute node enabled). If you want to use the dual-zone (hot standby storage cluster and compute cluster enabled) deployment, contact us.

This feature is available only when the HA mode is set to dual-zone (hot standby storage cluster and compute cluster enabled). The endpoint must be a private endpoint.

  1. Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region, then click the cluster ID.

  2. In the Database Connections section, click Create Read-only Node Endpoint. In the confirmation dialog, click OK. Use this endpoint to connect to the hot standby compute node.

    image

What's next