All Products
Search
Document Center

PolarDB:Best practice for deploying a GDN

Last Updated:Apr 10, 2024

This topic describes how to deploy a global database network (GDN) across regions.

Deployment plan

Architecture

A gaming company that provides services in Beijing plans to expand its services to Shanghai and Shenzhen. To achieve this expansion, the company requires a solution that guarantees real-time data synchronization across the regions and allows seamless access to the database from all regions. The solution must ensure that read requests are mainly distributed to clusters in the same region where the application is deployed, and write requests are distributed to the primary cluster.

ζžΆζž„θ§„εˆ’

Procedure

  1. Create a GDN

  2. Add a secondary cluster

  3. Connect to the GDN

  4. (Optional) Purchase a storage plan

Create a GDN

By default, a GDN contains only a primary cluster. For more information, see Create a GDN.

Note

You are not charged for cross-region data transmission within a GDN. You are charged only for use of PolarDB clusters within a GDN. For information about the billable items of PolarDB clusters, see Billable items.

Add a secondary cluster

Add a secondary cluster to the GDN to form a global database network. For more information, see Add a secondary cluster.

Note
  • When you create a secondary cluster, we recommend that you specify the same node specifications as the primary cluster to ensure low latency during data replication. You can specify the number of read-only nodes based on read requests handled by the secondary cluster that is deployed in the same region as the client.

  • GDN supports low-latency synchronization across regions. Secondary clusters automatically synchronize data from the primary cluster. You do not need to purchase additional services, such as Data Transmission Service (DTS).

Connect to the GDN

After the GDN is created, you can use the cluster endpoint of the PolarDB cluster that is deployed in the same region as your application to connect to the GDN and perform management operations. For more information, see Connect to a GDN.

(Optional) Purchase a storage plan

You can purchase a storage plan to offset the storage usage fees of the primary and secondary clusters. For more information, see Purchase a storage plan.

Note
  • Two types of storage plans are available: one for regions in the Chinese Mainland and one for regions outside the Chinese mainland. You can purchase only one storage plan of each type.

  • A storage plan is shared by all clusters in the designated regions. For more information, see FAQ about billing of storage plans.

  • If the capacity of your storage plan is insufficient, you can upgrade the storage plan. You cannot downgrade storage plans.

  • If the amount of used storage exceeds the capacity of your storage plan, you are charged for the excess storage resources based on the pay-as-you-go billing method.

Assume that a GDN has three clusters and each cluster requires 300 GB of storage capacity. You can purchase a storage plan with 500 GB of capacity that is available for regions in the Chinese Mainland to offset the storage usage fees of the primary cluster in the China (Beijing) region and the secondary cluster in the China (Shanghai) region. Then, you can purchase a storage plan with 300 GB of capacity that is available for regions outside the Chinese mainland to offset the storage usage fees of the secondary cluster in the China (Shenzhen) region. The excess 100 GB of storage usage is billed on a pay-as-you-go basis.