PolarDB for MySQL supports multi-zone deployment of clusters. A multi-zone deployment offers stronger disaster recovery capabilities than a single-zone deployment and can protect against data center-level failures. PolarDB provides several deployment options, including dual-zone with a hot standby storage cluster, dual-zone with a hot standby storage cluster and compute standby, and three-zone with a hot standby storage cluster and a logger node. You can choose the deployment option that best suits your needs.
Multi-zone deployment
In a multi-zone deployment, data is distributed across multiple availability zones. The primary and secondary zones each store three data replicas, totaling six, which provides a higher SLA guarantee. Compute nodes reside in the primary zone. The secondary zone contains the hot standby storage cluster and, in some configurations, compute nodes for failover if the primary zone fails.
After you enable cross-zone automatic switchover, the cluster automatically fails over between the primary and secondary zones if the primary zone fails.
For disaster recovery or to provide nearby access for ECS instances, you can manually fail over between the primary and secondary zones.
A multi-zone deployment has the following requirements:
The PolarDB cluster must be in a region with two or more availability zones. The following regions do not support multi-zone deployment: China (Qingdao), China (Hohhot), China (Chengdu), Korea (Seoul), Philippines (Manila), and Thailand (Bangkok).
The secondary zone must have sufficient compute resources.
High-availability modes
Overview
Single-zone (hot standby disabled)
This mode provides database services only in the primary zone and does not include a hot standby storage cluster, which makes it a low-cost option.
However, recovery takes longer after a complete availability zone failure. If you require cross-zone high availability, we recommend enabling a hot standby storage cluster.
Switching rules
You can switch to the dual-zone (with a hot standby storage cluster) mode or the dual-zone (with a hot standby storage cluster and compute standby) mode.
Use cases
Small websites or applications
Offload database O&M with a cost-effective cloud database to focus on your business.
Personal learning
Database beginners can use this basic configuration for database testing and learning.
Development and testing
The rapid delivery of cloud databases lets you create and release resources on demand, significantly improving development efficiency.
Dual-zone (hot standby storage)
Data is distributed across multiple availability zones. The primary and secondary zones each store a complete copy of the data, which provides a higher SLA guarantee.
All compute nodes must reside in the primary zone. The secondary zone's hot standby storage cluster handles failover if the primary zone fails.
Switching rules
You can only switch to the dual-zone (with a hot standby storage cluster and compute standby) mode.
Billing
This mode stores six data replicas (three each in the primary and secondary zones), resulting in higher storage costs than the single-zone mode.
Use cases
This classic high-availability architecture is suitable for more than 80% of use cases, including those in industries such as the internet, IoT, retail, e-commerce, logistics, and gaming.
Dual-zone (hot standby storage and compute)
Data is distributed across multiple availability zones. The primary and secondary zones each store a complete copy of the data, which provides a higher SLA guarantee.
The hot standby storage cluster in the secondary zone is used for failover if the primary zone fails. The secondary zone has the same number of compute nodes as the primary zone to ensure sufficient read-only resources after a failover and prevent service degradation.
Switching rules
You can only switch to the dual-zone (with a hot standby storage cluster) mode.
Billing
Compute nodes
This mode adds compute nodes to the secondary zone. By default, these nodes match the number and specifications of those in the primary zone, and they are billed separately.
Storage space
Data is distributed across multiple availability zones. The primary and secondary zones each store three data replicas for a total of six replicas. Storage costs are higher than in the single-zone (hot standby storage cluster disabled) mode.
Use cases
This mode is suitable for core production databases of large and medium-sized enterprises with high-availability requirements, such as those in finance, internet new retail, automotive manufacturing, education, and large-scale enterprise ERP systems.
Three-zone (hot standby storage and logger)
Provides strong data consistency across multiple availability zones. Compared to semi-synchronous and asynchronous replication, this three-node architecture with one primary, one secondary, and one logger combines physical replication with the X-Paxos protocol to provide stronger disaster recovery capabilities.
If the primary zone cluster fails, the system automatically fails over to the secondary zone and performs cross-zone, multi-replica strong synchronous replication. This ensures a recovery time objective (RTO) of less than 60 seconds, guarantees strong data consistency, and delivers financial-grade reliability.
Switching rules
You cannot switch to other high-availability modes.
Billing
Compute nodes
The standby node and logger node are free of charge. The read-write node and read-only nodes are billed as standard compute nodes.
Storage space
Data is distributed across multiple availability zones. The primary and secondary zones each store three data replicas for a total of six replicas. Storage costs are higher than in the single-zone (hot standby storage cluster disabled) mode.
Use cases
This mode is suitable for core production databases of large and medium-sized enterprises with high-availability requirements, such as those in finance, internet new retail, automotive manufacturing, education, and large-scale enterprise ERP systems.
For information about how compute nodes and storage space are billed, see Billing.
Enable or switch high-availability modes
You can select a high-availability mode in the Network and Zone section when you create a cluster.
NoteAvailable high-availability modes depend on the number of availability zones and resources in the cluster's region. The options on the purchase page prevail.
In the Enable Hot Standby Cluster section, you can select one of the following high-availability modes: Dual-AZ (enable hot standby storage cluster), Single-AZ (disable hot standby storage cluster), Dual-AZ (enable hot standby storage cluster and compute standby), or Three-AZ. If you select Single-AZ (disable hot standby storage cluster), only the primary cluster (with 3 data replicas) is retained, and the unit price for storage is half of that when a hot standby storage cluster is enabled.
You can go to the page. Click the target cluster. On the Basic Information page, perform the Switch to HA Mode in the Distributed Storage section.
You can go to the page. Click the target cluster, and on the Cluster Availability tab of the page, click Switch to HA Mode.
Switching high-availability modes is subject to certain limitations. If your cluster does not support switching to the desired mode, we recommend that you create a new cluster and select the desired mode during purchase. Then, you can use Data Transmission Service (DTS) to migrate data from your existing cluster to the new one. For more information about data migration, see Migrate data between PolarDB for MySQL clusters.
