PolarDB for MySQL clusters support multi-zone deployment. Compared with single-zone deployment, multi-zone deployment can enhance disaster recovery capabilities and withstand data center-level faults. PolarDB provides multiple deployment solutions: dual-zone (hot standby storage cluster enabled) deployment, dual-zone (hot standby storage cluster and hot spare compute cluster enabled) deployment, and three-zone (hot standby storage cluster and logger node enabled) deployment. You can select a deployment solution based on your business scenario.
Multi-zone deployment
If you use multi-zone deployment, data is distributed in multiple zones. The primary zone and the secondary zone individually contain three replicas of data. This way, a total of six replicas of data are saved, which ensures high SLA reliability. Compute nodes must be deployed in the primary zone. The hot standby storage cluster and compute nodes in the secondary zone are mainly deployed for a failover when the primary zone fails.
After you enable the cross-zone automatic switchover feature for the cluster, a failover is performed between the primary and secondary zones when resources in the primary zone are unavailable.
You can manually switch the primary and secondary zones for disaster recovery or for nearby access to ECS instances.
The following figure shows the architecture of the deployment solutions.
To use multi-zone deployment, the following requirements must be met:
Available resources are deployed in two or more zones within the region in which the PolarDB for MySQL cluster is deployed. The multi-zone deployment feature is unavailable in the following regions: China (Qingdao), China (Hohhot), China (Chengdu), South Korea (Seoul), Philippines (Manila), and Thailand (Bangkok).
The secondary zone has sufficient computing resources.
High availability mode
Solution overview
Single-zone (hot standby storage cluster disabled)
Database services are only provided by the cluster in the primary zone. This solution is less costly.
However, it takes longer time to recover services in case the primary zone fails. If you require cross-zone high availability, we recommend that you enable the hot standby cluster feature.
Switching rules
It can be switched to dual-zone (hot standby storage cluster enabled) or dual-zone (hot standby storage cluster and compute cluster enabled).
Scenarios
Small-sized websites and applications
You can offload routine O&M tasks to Alibaba Cloud and focus on developing your applications.
Individuals
If you are new to PolarDB, you can use PolarDB for testing and learning.
Development and testing
PolarDB features lightning-fast provision, allowing you to flexibly scale your database with your business requirements. This significantly improves R&D and testing efficiency.
Dual-zone (hot standby storage cluster enabled)
Data is distributed in multiple zones. The primary zone and secondary zone each store a copy of full data, which ensures high service level agreement (SLA).
Compute nodes must be deployed in the primary zone. The hot standby storage cluster in the secondary zone is mainly deployed for a failover when the primary zone fails.
Switching rules
It can only be switched to dual-zone (hot standby storage cluster and compute cluster enabled).
Pricing
Data is distributed in multiple zones. The primary zone and a secondary zone individually contain three replicas of data. This way, a total of six replicas of data are saved. Its storage costs are higher than those of the single-zone (hot standby cluster disabled).
Scenarios
It is suitable for more than 80% of use cases in various industries, such as Internet, IoT, online retailing, logistics, and gaming.
Dual-zone (hot standby storage cluster and compute cluster enabled)
Data is distributed in multiple zones. The primary zone and secondary zone each store a copy of full data, which ensures high service level agreement (SLA).
In case of primary zone failures, business can be switched over to the hot standby storage cluster in the secondary zone. The number of compute nodes in the secondary zone is the same as the in the primary zone. Therefore, the secondary zone can provide sufficient read-only nodes after a failover to prevent service from being degraded.
Switching rules
It can only be switched to dual-zone (hot standby storage cluster and compute cluster enabled).
Pricing
Compute nodes
When you purchase a cluster, compute nodes are added to the secondary zone in which the hot standby storage cluster resides. By default, the number and specifications of compute nodes in the secondary zone are the same as those in the primary zone. The compute nodes in the secondary zone are separately charged.
Storage
Data is distributed in multiple zones. The primary zone and a secondary zone individually contain three replicas of data. This way, a total of six replicas of data are saved. Its storage costs are higher than those of the single-zone (hot standby cluster disabled).
Scenarios
It is suitable for large-sized enterprises and medium-sized enterprises whose production databases need to process a large number of read requests during peak hours or perform intelligent data analysis. These enterprises include financial institutions, online retailers, automobile enterprises, education enterprises, and Enterprise Resource Planning (ERP) service providers.
Three-zone (hot standby storage cluster and logger node enabled)
Cross-zone strong consistency Compared with semi-synchronous and asynchronous methods, the three-node architecture of one primary, one secondary, and one log is adopted. Physical replication is combined with X-Paxos protocols to provide higher disaster recovery capabilities.
When the primary zone fails, a failover is performed between the primary and secondary zones and strong-consistency replication of multiple replicas is implemented across zones to ensure that the recovery time objective (RTO) is less than 60 seconds. This also ensures strong data consistency and provides high financial reliability.
Switching rules
It cannot be switched to other high-availability modes.
Pricing
Compute nodes
Secondary nodes and logger nodes are free of charge. Primary nodes and read-only nodes are charged as common compute nodes.
Storage
Data is distributed in multiple zones. The primary zone and a secondary zone individually contain three replicas of data. This way, a total of six replicas of data are saved. Its storage costs are higher than those of the single-zone (hot standby cluster disabled).
Scenarios
It is suitable for large-sized enterprises and medium-sized enterprises whose production databases need to process a large number of read requests during peak hours or perform intelligent data analysis. These enterprises include financial institutions, online retailers, automobile enterprises, education enterprises, and Enterprise Resource Planning (ERP) service providers.
For more information about billing rules for compute nodes and storage, see Billing.
Enable or switch to the high-availability mode
When you purchase a cluster, you can select the high-availability mode in the Network and Zone section.
NoteThe high-availability mode option is limited by the zones and resources available in the region where the cluster is deployed. For more information, see the buy page.
Go to the
. On the Clusters page, click the cluster. In the Database Distributed Storage section of the Basic Information page, click Switch to HA Mode.Go to the
. On the Clusters page, click the cluster. Choose . On the Cluster Availability tab, click Switch to HA Mode.
Switching to the high availability mode may have some limits. If your cluster does not support switching to the high availability mode, we recommend that you purchase a new cluster and select the high-availability mode. Then, migrate the existing cluster to the new cluster by using Data Transmission Service (DTS). For information about how to migrate an existing cluster to a new cluster, see Migrate data between PolarDB for MySQL clusters.