All Products
Search
Document Center

PolarDB:Add and manage secondary clusters

Last Updated:Jun 21, 2026

After you create a Global Database Network (GDN), you can create new clusters and add them to the GDN as secondary clusters. When no longer needed, you can remove secondary clusters from the GDN. A removed cluster can still be used as a standalone PolarDB cluster.

Limitations

You must create a Global Database Network (GDN) before you can add a secondary cluster to it.

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_standby cluster 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.

    Note

    To 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:

Important

Cross-border data transfer fees will be charged starting from 00:00:00 on April 1, 2026 (Singapore time). 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: USD 0.80 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).

    Billing example

    Example

    At 09:00, you query the physical write position of the log and find it is ib_logfile1/648143676. At 10:00, the position is updated to ib_logfile3/648142342. The amount of data written in this hour is the difference between the two positions.

    1. Amount written to the start file (ib_logfile1):
      Subtract the start offset from the total file size. Each log file is 1 GB (1,073,741,824 bytes). The amount written is 1073741824 - 648143676 = 425598148 bytes.



    2. Amount written to the intermediate file (ib_logfile2):
      After ib_logfile1 is full, the system completely writes ib_logfile2. This amount is 1,073,741,824 bytes (1 GB).



    3. Amount written to the end file (ib_logfile3):
      This is the offset at the end, which is 648142342 bytes.



    Therefore, the total amount written is 425598148 + 1073741824 + 648142342 = 2147482314 bytes. This is 2147482314 / 1024 / 1024 / 1024 = 1.999998 GB (rounded down to six decimal places). The cross-border data transfer fee for this hour is approximately 1.999998 GB × USD 0.80/GB = USD 1.5999984.

    Query the log write progress and physical file offset

    -- Query the current write progress of the log system.
    SHOW STATUS LIKE 'Innodb_log_write_lsn'; 
    +----------------------+------------+
    | Variable_name        | Value      |
    +----------------------+------------+
    | Innodb_log_write_lsn | 1721889596 |
    +----------------------+------------+
    
    -- Query the physical file offset in bytes.
    SELECT lsn_to_pos(1721889596); 
    +------------------------+
    | lsn_to_pos(1721889596) |
    +------------------------+
    | ib_logfile1/648143676  |
    +------------------------+
Note

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 a physical replication mechanism based on redo logs. Therefore, enabling the binary log is not required by default. If your workload requires binary log synchronization between clusters (for example, for data subscription), you must ensure that the binary log parameter (loose_polar_log_bin) is configured identically on the primary and secondary clusters. Otherwise, you risk binary log data inconsistency after a primary/secondary switchover.

Add a secondary cluster

A Global Database Network (GDN) uses China Unicom's cross-border Express Connect and cross-border Cloud Enterprise Network (CEN) to support adding cross-border secondary clusters. A configuration is cross-border when the primary and secondary clusters are in different types of regions, as defined below. Adding a cross-border secondary cluster requires additional preparation.

Note

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), please submit a ticket.

  • 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.

Procedure

Note

The time required to create a cluster depends on the primary cluster's data volume. The initial data copy process can be slow, so please be patient.

  1. Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).

  2. On the Global Database Network (GDN) page, find the target GDN and click Add Secondary Cluster in the Actions column.

  3. On the purchase page that appears, set the following parameters. You can configure other parameters based on your business needs. 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 you selected in the previous step is used by default.

    • Database Engine: Must match the primary cluster's database engine version: MySQL 8.0, MySQL 5.7, or MySQL 5.6.

    • Node Specifications: To ensure low-latency synchronization, we recommend that you use the same node specifications as the primary cluster. The number of read-only nodes does not need to match that of the primary cluster. Base the number of nodes on the secondary cluster's read request volume.

  4. After the purchase is complete, return to the Global Database Network (GDN) page. Find the target GDN and click its GDN ID/Name to open the details page. The new secondary cluster appears in the Clusters section. This list shows the status, role, and replication latency for each cluster. The Actions column for 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).

    Note
    • The time required to create a secondary cluster depends on the primary cluster's data volume. The initial data copy process can be slow, so please be patient.

    • Creating a secondary cluster has minimal performance impact on 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 clusters.

Remove a secondary cluster

  1. Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).

  2. On the Global Database Network (GDN) page, find the target GDN and click its GDN ID to go to the details page.

  3. In the Clusters section, find the target secondary cluster and click Remove in the Actions column.

    Note
    • The removal process takes about five minutes.

    • During the removal process, all cluster connection endpoints in the GDN, including those of the cluster being removed, remain available for normal database access.

    • 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 is set to read/write mode.

    • After a cluster is removed from a GDN, it cannot be re-added as a secondary cluster. Perform this action with caution.

  4. Read the notes in the pop-up dialog box carefully, then click OK to remove the secondary cluster.

Switch the primary cluster

  1. Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).

  2. On the Global Database Network (GDN) page, find the target GDN and click its GDN ID to go to the details page.

  3. In the Clusters section, find the target secondary cluster and click Switch to Primary Cluster in the Operation column.

  4. In the Primary/Secondary Switchover dialog box, select the secondary cluster to become the new primary cluster and click OK.

    Note
    • A primary/secondary switchover does not swap the connection endpoints of the two clusters. You may need to update your application's configuration. For example, if the original primary cluster had a public endpoint, ensure the new primary cluster also has one to avoid application access issues. To view connection endpoints, see View connection endpoints and ports.

    • A primary/secondary switchover in a GDN completes within 10 minutes (typically within 5 minutes based on test results). During the switchover, transient disconnections of up to 160 seconds may occur. We recommend that you perform the switchover during off-peak hours and ensure that your application has a reconnection mechanism.

    • If you enable the Forced Switchover switch in the Primary/Secondary Switchover dialog box:

      • You cannot specify a target cluster for a forced switchover. Instead, the system promotes the secondary cluster with the highest log sequence number (LSN) to be the new primary.

      • A forced switchover carries a risk of data loss. The original primary cluster is automatically removed after the switchover. Perform this action with caution.

Recreate a secondary cluster

Use cases

You may need to recreate a secondary cluster in a GDN in the following scenarios:

  • A secondary cluster fails and cannot be recovered, and you need to recreate it to restore the service.

  • You need to update the basic configuration or environment of the secondary cluster.

  • If a secondary cluster has been out of sync with the primary cluster for an extended period, you must recreate it to ensure data consistency between the primary and secondary clusters.

Important
  • The Recreate Secondary Cluster feature is currently in phased release. If you need to use it, go to Quota Center, find the quota by its ID polardb_gdn_reset_member, and click Apply in the Operation column to request access.

  • The specified secondary cluster will be unavailable while it is being recreated. Perform this action with caution.

Procedure

  1. Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network (GDN).

  2. On the Global Database Network (GDN) page, find the target GDN and click its GDN ID to go to the details page.

  3. In the Clusters section, find the target secondary cluster and click Recreate Secondary Cluster in the Operation column.

    重搭从集群

  4. Read the notes in the pop-up dialog box carefully, then click OK.

FAQ

How do I view cross-border transfer fees?

You can view them on the Expenses and Costs > Bill > Bill Details page. The bill details list the product as Alibaba Cloud Marketplace (Third-party) and China Unicom Cross-border Data Transmission, and the billing item as China Unicom Cross-region Traffic.

Why does my calculated traffic not match the actual bill?

The system's data collection tasks do not run exactly on the hour and may deviate by several minutes. This can cause slight discrepancies between the theoretical traffic calculated on an hourly basis and the actual billed traffic. The difference is typically within 10%.

Why do small cross-border fees still occur even with no write activity on the primary cluster?

The primary cluster periodically performs background maintenance tasks, such as data cleanup, which generate a small amount of redo logs (approximately 0.0005 GB/hour). These logs are also synchronized to the secondary cluster, resulting in minimal fees.

How can I tell if I have signed the "PolarDB Cross-border Data Transmission Compliance Commitment"?

If you have not signed it, the following message will appear on the purchase page when you try to add a cross-border secondary cluster: The selected regions for the primary and secondary clusters involve cross-border data transfer. Sign the 'Cross-border Data Transmission Compliance Commitment' before you proceed with the creation.

Related documentation

Related APIs

API

Description

CreateDBCluster

Use the cluster creation API to add a secondary cluster to a GDN. Set the following parameters:

  • CreationOption: CreateGdnStandby

  • GDNId: Enter the ID of your target Global Database Network.

RemoveDBClusterFromGDN

Remove a secondary cluster from a Global Database Network.

SwitchOverGlobalDatabaseNetwork

Switch the primary cluster of a Global Database Network.