You can add new clusters to a Global Database Network (GDN) as secondary clusters, or remove secondary clusters that are no longer needed. A removed cluster continues to function as a standalone PolarDB cluster.
Usage notes
To add a secondary cluster, you must first create a Global Database Network (GDN).
Supported regions
GDN is available in 10+ regions worldwide, including the Chinese mainland, China (Hong Kong), and overseas regions.
|
Primary cluster region |
Secondary cluster region |
|
All regions in the Chinese mainland |
Any region in the Chinese mainland, including the primary cluster's region. Example: If the primary cluster is in China (Hangzhou), secondary clusters can be in any Chinese mainland region, including Hangzhou. Note
For other region requirements, submit a ticket. |
|
Regions outside the Chinese mainland |
China (Hong Kong), Japan (Tokyo), South Korea (Seoul), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UK (London). |
For regions outside the Chinese mainland, sign the Cross-Border Data Transfer Compliance Agreement before creating a secondary cluster.
Feature limits
-
Clusters in a GDN do not support the serverless feature or In-Memory Column Index (IMCI).
-
Clusters in a GDN do not support the database and table restoration feature.
Other limits
-
A GDN supports one primary cluster and up to four secondary clusters.
-
Primary and secondary clusters must have the same database engine version: PostgreSQL 14 and PostgreSQL 16.
-
Secondary cluster specifications must match or exceed the primary cluster's.
-
A cluster can belong to only one GDN.
Add a secondary cluster
-
Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network.
-
On the Global Database Network page, find the target GDN and click Add Secondary Cluster in the Actions column.
-
On the purchase page, configure the following parameters. You can configure other parameters based on your business needs. For more information, see Custom purchase.
-
Region: Only some regions are supported. For details, see Usage notes.
-
Creation Method: Select Create Secondary Cluster.
-
GDN: Select the GDN that you want to join. By default, the GDN that you selected in the previous step is selected.
-
Database Engine: The database engine must be the same as that of the primary cluster: PostgreSQL 14.
-
Compute Node Specifications: Must initially match those of the primary cluster. You can upgrade the specifications on the cluster details page after creation.
-
-
After the purchase is complete, return to the Global Database Network page. Find the target GDN and click its GDN ID to go to the details page. The new secondary cluster appears in the Clusters section with the status Creating. The primary cluster status remains Running. A GDN supports up to five clusters in total, including the primary cluster.
Remove a secondary cluster
-
Log on to the PolarDB console. In the left-side navigation pane, click Global Database Network.
-
On the Global Database Network page, find the target GDN and click its GDN ID to go to the details page.
-
In the Clusters section, find the target secondary cluster and click Remove in the Operation column.
Note-
The removal process takes about five minutes.
-
During removal, the endpoints of all clusters in the GDN, including the cluster being removed, remain available.
-
Only secondary clusters can be removed from a GDN. The primary cluster cannot be removed.
-
After a secondary cluster is removed from a GDN, data replication from the primary cluster stops, and the cluster is set to read/write mode.
-
After a cluster is removed from a GDN, it cannot be added back to a GDN as a secondary cluster.
-
-
In the dialog box that appears, review the notes and 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.
-
On the Global Database Network page, find the target GDN and click its GDN ID to go to the details page.
-
In the Clusters section, find the target secondary cluster and click Switch to Primary Cluster in the Operation column.
-
In the Primary-secondary switchover dialog box, select the cluster ID of the secondary cluster as the new primary cluster, and then click OK.
Note-
The Forced Switch feature is not supported.
-
If the original primary cluster has a public endpoint, ensure that the new primary cluster also has one. Otherwise, your applications may fail to access the database. For information about how to view endpoints, see View or apply for an endpoint.
-
Switching the primary cluster may cause a transient connection interruption of about 160 seconds. Perform this operation during off-peak hours and ensure that your application has an automatic reconnection mechanism.
-
Related documentation
-
Global Database Network (GDN): Overview of GDN architecture and use cases.
-
Connect to a Global Database Network: Instructions for connecting to a GDN.
API reference
|
API |
Description |
|
Adds a secondary cluster to a GDN. The following parameters are required:
|
|
|
Removes a secondary cluster from a GDN. |
|
|
Switches the primary cluster of a GDN. |