Add and manage secondary clusters
After you create a Global Database Network (GDN), you can create clusters and add them to the GDN as secondary clusters. When a secondary cluster is no longer needed, you can remove it from the GDN. A removed secondary cluster can still be used as a standalone PolarDB cluster.
Applicable scope
You must Create a global database network before you can add a secondary cluster to the GDN.
Supported regions
All regions in the Chinese mainland, China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London).
Feature limitations
Clusters in a Global Database Network (GDN) support the In-Memory Column Index (IMCI) feature. However, you must enable the
loose_polar_enable_imci_with_standbycluster parameter and the cluster version must meet one of the following requirements before you can add a read-only column-oriented node.MySQL 8.0.1 with a revision version of 8.0.1.1.48 or later.
MySQL 8.0.2 with a revision version of 8.0.2.2.27 or later.
Clusters in a GDN can be serverless clusters or clusters with defined specifications that have the serverless feature enabled. However, if the database engine version of the primary cluster is earlier than the following versions, all clusters in the GDN must have at least one read-only node:
MySQL 8.0.1 with a minor engine version earlier than 8.0.1.1.42.
MySQL 8.0.2 with a minor engine version earlier than 8.0.2.2.23.
Clusters in a GDN do not support database and table restoration.
Other limitations
A GDN consists of one primary cluster and up to four secondary clusters.
NoteTo add more secondary clusters, go to Quota Center, find the quota item with the ID
polardb_mysql_gdn_region, and click Apply in the Actions column.A cluster can belong to only one GDN.
Only new clusters can be added as secondary clusters; you cannot use existing ones.
The primary and secondary clusters must use the same database engine version: MySQL 8.0, MySQL 5.7, or MySQL 5.6.
For secondary clusters in a GDN that are not serverless clusters, each compute node must have at least 4 CPU cores.
By default, each cluster in a GDN contains 2 nodes. You can add up to 16 nodes.
Pricing
Charges for a Global Database Network (GDN) consist of the cluster costs and any applicable cross-border data replication fees. The billing rules are as follows:
Cross-border data transfer fees will be charged starting from 00:00:00 on February 1, 2026 (UTC+8). Before this date, this service is free of charge. For more information, see [Notice] Announcement on network fee adjustment for Global Database Network (GDN).
Free scenarios:
Your primary and secondary clusters are both deployed in regions within the Chinese mainland, or both are deployed in the China (Hong Kong) region or other overseas regions. Examples:
Both the primary and secondary clusters are in the Chinese mainland. For example, the primary cluster is in China (Chengdu) and the secondary clusters are in regions such as China (Hangzhou) or China (Shenzhen).
Both the primary and secondary clusters are in the China (Hong Kong) region or other overseas regions. For example, the primary cluster is in Singapore and the secondary cluster is in Philippines (Manila).
Billable scenarios:
Cross-border fees apply when a GDN spans the Chinese mainland border—for example, if one cluster is in the Chinese mainland and another is in China (Hong Kong) or an overseas region. Examples:
The primary cluster is in the Chinese mainland and the secondary cluster is outside the Chinese mainland. For example, the primary cluster is in China (Chengdu) and the secondary cluster is in a region such as China (Hong Kong) or Singapore.
The primary cluster is outside the Chinese mainland and the secondary cluster is in the Chinese mainland. For example, the primary cluster is in Singapore and the secondary cluster is in a region such as China (Hangzhou) or China (Shenzhen).
Billing rule: CNY 5.6 per GB, billed hourly. The fee is calculated hourly based on the volume of redo log data physically replicated from the primary cluster to a cross-border secondary cluster. This traffic fee can be estimated by querying the physical position converted from the log sequence number (LSN).
If you use the global domain name feature, you will incur additional fees for internal DNS resolution and inter-region data transfer. For more information, see Global domain name pricing.
Usage notes
A Global Database Network (GDN) synchronizes data by using physical replication based on Redo Log. Therefore, by default, you do not need to Enable binary logging. If your workload requires binary log synchronization between clusters, for example for data subscription, make sure that the binary log parameter (loose_polar_log_bin) is configured identically on the primary cluster and the secondary clusters. Otherwise, binary log data may be inconsistent after you Switch the primary cluster.
Add a secondary cluster
A Global Database Network (GDN) supports adding cross-border secondary clusters based on China Unicom cross-border Express Connect and cross-border Cloud Enterprise Network (CEN). A configuration is cross-border when the primary cluster and the secondary cluster to be added are in the following two different groups of regions. Adding a cross-border secondary cluster requires additional preparations.
China Unicom cross-border Express Connect and cross-border Cloud Enterprise Network (CEN), collectively referred to as cross-border services, are cross-border data products for enterprise customers. These products are jointly offered by Alibaba Cloud Computing Co., Ltd. (Alibaba Cloud) and China Unicom. The cross-border circuits, also known as cross-border leased lines, are data connection services operated by Zhejiang Unicom and provided to you through Alibaba Cloud sales channels. For more information, see Cross-border service FAQ.
If your primary cluster is in US (Silicon Valley) or US (Virginia) and the secondary cluster to be added is in the Chinese mainland or China (Hong Kong), submit a ticket to contact us.
Chinese mainland: China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), and China (Chengdu).
Other regions: China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Thailand (Bangkok), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London).
Preparations (cross-border secondary clusters only)
Sign the PolarDB Cross-border Data Transmission Compliance Commitment.
Apply for a China Unicom cross-border leased line.
Activate the Cloud Data Transfer (CDT) cross-border service.
Procedure
The time required to create a cluster depends on the data volume of the primary cluster. The initial data copy is slow, so wait for it to complete.
Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).
On the Global Database Network (GDN) page, find the target GDN. In the Actions column, click Add Secondary Cluster.
On the purchase page that appears, configure the following parameters. Configure other parameters based on your business requirements. For more information, see Custom purchase.
Region: Select the region where you want to add the secondary cluster.
Creation Method: Select Create Secondary Cluster.
GDN: Select the GDN to join. The target GDN selected in the previous step is used by default.
Database Engine: The database engine must be the same as that of the primary cluster: MySQL 8.0, MySQL 5.7, or MySQL 5.6.
Compute node specifications: When you create the secondary cluster, use the same node specifications as the primary cluster to ensure low-latency synchronization. The number of read-only nodes does not need to match that of the primary cluster. Select the number based on the read request volume of the local secondary cluster.
After the purchase is complete, return to the Global Database Network (GDN) page, find the target GDN, and click GDN ID/Name to open the GDN details page. The new secondary cluster appears in the Clusters section. After the secondary cluster is created, you can view the status, role, and replication latency of each cluster in the Cluster list. The Actions column of a secondary cluster provides links to Remove and Switch to Primary Cluster. Each GDN can contain up to five clusters: one primary cluster and up to four secondary clusters.
NoteThe time required to create a secondary cluster depends on the data volume of the primary cluster. The initial data copy is slow, so wait for it to complete.
Creating a secondary cluster has minimal impact on the performance of the primary cluster.
You cannot create database accounts on a secondary cluster. Create accounts on the primary cluster, and the system automatically synchronizes them to the secondary cluster.
Remove a secondary cluster
Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).
On the Global Database Network (GDN) page, find the target GDN, and click GDN ID to open the GDN details page.
In the Clusters section, find the target secondary cluster. In the Actions column, click Remove.
NoteThe entire removal process takes about 5 minutes.
During the removal process, the endpoints of all clusters in the GDN, including the secondary cluster being removed, remain available. You can continue to access the database by using the cluster endpoints.
Only secondary clusters can be removed from a GDN. The primary cluster cannot be removed.
After a secondary cluster is removed from a GDN, it stops synchronizing data with the primary cluster, and the system sets the cluster to read/write mode.
After a cluster is removed from a GDN, it cannot be added to the GDN again as a secondary cluster. Proceed with caution.
Carefully read the notes in the dialog box that appears. After you confirm that the information is correct, click OK to remove the secondary cluster.
Switch the primary cluster
Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).
On the Global Database Network (GDN) page, find the target GDN, and click GDN ID to open the GDN details page.
In the Clusters section, find the target secondary cluster. In the Operation column, click Switch to Primary Cluster.
In the Primary/Secondary Switchover dialog box, select the cluster ID of the secondary cluster to use as the new primary cluster, and click OK.
NoteA primary/secondary switchover does not swap the endpoints of the two clusters, so check your application configuration. If the original primary cluster in the GDN has a public endpoint, make sure that the new primary cluster also has a public endpoint. Otherwise, applications cannot access the database. To view cluster endpoints, see View endpoints and ports.
A primary/secondary switchover in a GDN completes within 10 minutes (test results show that it takes less than 5 minutes). During the switchover, transient disconnections of up to 160 seconds may occur. Perform the switchover during off-peak hours and make sure that your application has a reconnection mechanism.
In the Primary/Secondary Switchover dialog box, if you turn on Forced Switchover, the following applies:
You cannot specify a target cluster for a forced switchover. By default, the system selects the secondary cluster with the largest log sequence number (LSN) as the new primary cluster.
A forced switchover carries a risk of data loss. After the switchover, the original primary cluster is automatically removed. Proceed with caution.
Recreate a secondary cluster
Use cases
You may need to recreate a secondary cluster in a GDN in the following situations:
A secondary cluster fails and cannot be recovered. Recreate the secondary cluster to restore the service.
You need to update the basic configuration or environment of the secondary cluster.
The secondary cluster has been out of sync with the primary cluster for an extended period. Recreate it to ensure data consistency between the primary and secondary clusters.
The specified secondary cluster is unavailable while it is being recreated. Proceed with caution.
Procedure
Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).
On the Global Database Network (GDN) page, find the target GDN, and click GDN ID to open the GDN details page.
In the Clusters section, find the target secondary cluster. In the Operation column, click Recreate Secondary Cluster.
Carefully read the notes in the dialog box that appears. After you confirm that the information is correct, click OK.
FAQ
Related documentation
Connect to a Global Database Network: Describes how to connect to a Global Database Network (GDN).
Create a global domain name: Describes how to create a unified endpoint that provides nearby access and keeps the domain name unchanged after the primary cluster is switched over.
Related API operations
API | Description |
Use the cluster creation API operation to add a secondary cluster to a Global Database Network. Set the following parameters:
| |
Removes a secondary cluster from a Global Database Network. | |
Switches the primary cluster of a Global Database Network. |