After you create a Global Database Network (GDN), you can add new clusters to it as secondary clusters. If a secondary cluster is no longer needed, you can remove it from the GDN. Once removed, the cluster can be used 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 more than 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 |
The same region as the primary cluster, or any other region in the Chinese mainland. For example, if the primary cluster is in China (Hangzhou), the secondary cluster can be in China (Hangzhou) or any other region in the Chinese mainland. 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), Thailand (Bangkok), 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 can consist of one primary cluster and up to four secondary clusters.
-
Primary and secondary clusters must have the same database engine version: PostgreSQL 14.
-
Secondary cluster node specifications must be equal to or greater than the primary cluster's. Keep specifications consistent.
-
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: The compute node specifications of the secondary cluster must initially match those of the primary cluster. You can upgrade the specifications on the cluster's details page after it is created.
-
-
After you complete the purchase, 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. The GDN now contains two clusters, and you can add up to three more secondary clusters.
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 the removal process, the endpoints of all clusters in the GDN, including the secondary cluster that is 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 in the current GDN has a public endpoint, make sure that the new primary cluster also has a public endpoint. 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 break of about 160 seconds. We recommend performing this switchover during off-peak hours and ensuring that your application is configured with an automatic reconnection mechanism.
-
Related documentation
-
Global Database Network (GDN): Learn about GDN, its architecture, and use cases.
-
Connect to a Global Database Network: Learn how to connect to a Global Database Network (GDN).
API reference
|
API |
Description |
|
Use the CreateDBCluster API operation to add 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. |