Learn how to enable the global database network (GDN) service.
Create a GDN
-
Log on to the PolarDB-X console. In the upper-left corner of the page, select the region of your target instance.
-
On the Instances page, click the PolarDB-X 2.0 tab. Click the ID of your target instance.
-
On the Basic Information page, click Create GDN.
-
In the dialog box, configure the following parameters.
-
Name: Enter a name for your GDN. We recommend using a business-relevant name for easy identification. The name does not need to be unique.
-
Region: Select the region where the primary instance is located.
NoteSelect the region of the instance that you will designate as the primary instance.
-
Primary Instance: Select an existing instance as the primary instance of the GDN.
-
GDN mode: Select a GDN mode.
-
Primary/Standby Mode: Read requests are sent to the local instance, and write requests are sent to the primary instance.
-
Active-Active Mode: Enables bidirectional data writes between the primary and secondary instances. This helps you build a geographically distributed, active-active database service to improve business continuity and user experience.
-
-
Synchronize DDL: Select whether to synchronize DDL statements between instances in the GDN.
-
DML Replication Policy: Select a DML replication policy.
-
Conflict Policy: Select a data conflict resolution policy.
NoteThis parameter is available only if you select Active-Active Mode.
-
-
After you configure the parameters, click OK.
Manage a GDN
Log on to the PolarDB-X console. In the left-side navigation pane, click GDN to go to the GDN list page. You can click the Create GDN button at the top of the page to create a new GDN. The list displays the GDN ID, Status, GDN Mode (such as active-active mode), Instance Information, Role (primary instance/secondary instance), Region, Running Status, Data Sync Status, Data Latency, Read/Write Status, and Creation Time for each GDN. In the Actions column, you can Add Secondary Instance or Delete.
Add a secondary instance
-
Log on to the PolarDB-X console. In the left-side navigation pane, click GDN to go to the GDN list page.
-
Find the target GDN and click its GDN ID.
-
On the GDN details page, click Add Secondary Instance to the right of the Primary Instance.
-
In the Add Secondary Instance dialog box, Select Secondary Instance Purchase Method, either Subscription or Pay-as-you-go.
Note-
You cannot add an existing instance as a secondary instance. You must purchase a new instance in the Add Secondary Instance dialog box.
-
Subscription is a prepaid billing method where you pay for resources upfront. This method is suitable for long-term needs and is more cost-effective than Pay-As-You-Go.
-
Pay-As-You-Go is a postpaid billing method where you are billed hourly for the resources you use. This method is ideal for short-term needs because you can release the cluster immediately after use to save costs.
-
A secondary instance is created from an existing backup using the backup and restoration process. It uses an independent data restoration channel instead of pulling the full dataset from the primary instance. This process does not affect the performance of the primary instance.
-
-
On the instance purchase page, configure the following parameters. For information about other parameters, see Create an instance.
Parameter
Description
Backup set region
The region where the backup set of the secondary instance is located.
Global database network
This parameter is fixed to Secondary Instance.
Region
The deployment region of the secondary instance. This selection cannot be changed after purchase.
Note-
You can select only a region that is mapped to the region of the primary instance. For more information, see Region mappings between primary and secondary instances.
Database Engine
The database engine must be the same as that of the primary instance.
-
-
Click Buy Now to complete the purchase.
-
Return to the GDN details page. Click The instance is added. Refresh the page. or refresh the page to see the new secondary instance.