This describes how to deploy a Global Database Network (GDN) across regions.

Deployment plan

  • Architecture

    A gaming company provides services in Beijing and plans to provide services in Shanghai and Shenzhen. The company needs data to be shared across these regions and requires that all regions of the world can access the database. Read requests are expected to be processed by clusters in the same region where the application is deployed, while write requests can be forwarded to the primary cluster.

    Architecture
  • Process
    1. Create a GDN..
    2. Add a secondary cluster.
    3. Connect to a 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 the traffic that is generated during cross-region data transmission within a GDN. You are charged only for the use of PolarDB clusters in the GDN. For more information about the pricing rules 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 set the same node specifications as those of the primary cluster to ensure data replication at low latencies. You can specify the number of read-only nodes based on read requests to 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 like Data Transmission Service (DTS).

Connect to a GDN

After the GDN is created, you can use the cluster endpoint to connect to the GDN and perform management operations. For more information, see Connect to a GDN.

(Optional) Purchase a storage plan

You are eligible for storage plans when you use the following resources:

  • Storage for pay-as-you-go clusters

    The storage of each PolarDB cluster is charged based on the volume and storage duration of data. If you require a large storage capacity, such as 1,000 GB or more, we recommend that you use storage plans to reduce costs. For more information about the offset rules, see Rules for the deduction of storage plans.

    Note Storage plans can be used only on clusters that use the pay-as-you-go billing method for storage, and cannot be used on clusters that use the subscription billing method for storage.
  • Level-1 backups that exceed the free quota

    The remaining capacity of a storage plan after offsetting the storage of PolarDB clusters is automatically used to offset the level-1 backup storage space that exceeds the free quota. If the remaining capacity of the storage plan is insufficient to offset the level-1 backup storage space, you are charged for additional storage space on a pay-as-you-go basis. For more information about the offset rules, see Use storage plans to offset level-1 backup storage fees.

For more information, see Purchase a storage plan.

Note
  • You can select the following types of storage plans: storage plans that are available for regions inside mainland China, and storage plans that are available for China (Hong Kong) and regions outside China. You can purchase only one storage plan for each type.
  • A storage plan can be used by all the clusters in the regions that are specified by the Plan Type parameter. You can select Mainland China or China (Hong Kong) and regions outside China. For more information, see Storage plans.
  • If the capacity of your storage plan is insufficient, you can upgrade the storage plan. However, storage plans cannot be downgraded.
  • If the amount of used storage exceeds the capacity of your storage plan, you are charged for the additional storage resources based on the pay-as-you-go billing method.

For example, assume that each cluster in the GDN requires 300 GB of storage. You can purchase a mainland China storage plan of 500 GB to offset the storage of the primary cluster in the China (Beijing) region and the secondary cluster in the China (Shanghai) region. Then, you can purchase a China (Hong Kong) and regions outside China storage plan of 300 GB to offset the storage of the secondary cluster in Singapore. The 100 GB of storage that exceeds the capacity of the storage plan is charged on a pay-as-you-go basis.