This describes how to deploy a Global Database Network (GDN) across regions.
A gaming company provides services in Beijing and plans to provide services in Shanghai and Singapore. Data needs to be shared across regions and all regions of the world can connect to the same database. Read and write requests are sent to the clusters that is deployed in the same region as the clients.
Create a GDN
After you create a GDN, it contains a primary cluster. For more information, see Create a GDN.
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.
- When you create a secondary cluster, we recommend that you set the same node specifications as those of the primary cluster to ensure low-latency synchronization. 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, such as Data Transmission Service (DTS).
Connect to a GDN
After the GDN is created, you can use the cluster endpoint to connect to and manage the GDN. For more information, see Connect to a GDN.
(Optional) Purchase a storage plan
The storage plans are used to deduct the following fees:
- Fees of storage
The storage of each PolarDB cluster in a Global Database Network (GDN) is charged based on the data volume and retention period. If you require a large storage capacity, such as 1,000 GB or more, we recommend that you use storage plans to reduce costs.
- Fees of level-1 backups (exceeds free quota)
You can use a purchased storage plan to deduct the used storage of all PolarDB clusters within your account. The remaining capacity of the storage plan will be automatically used to deduct the storage that exceeds the free quota for level-1 backups at a ratio of 1:1 until the storage plan is exhausted. In this case, every 1 GB of the storage plan can deduct 1 GB of level-1 backup storage. If the remaining capacity of the storage plan is insufficient to deduct the storage of level-1 backups, the exceeded storage is charged on a pay-as-you-go basis. For more information about storage plans, see FAQ.
For more information, see Purchase a storage plan.
- You can select the following types of storage plans: storage plans that apply to regions inside mainland China, and storage plans that apply to 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 FAQ.
- If the capacity of your storage plan is insufficient, you can upgrade the storage plan. However, storage plans cannot be downgraded.
- You are charged for the storage that is not covered by the storage plan on a pay-as-you-go basis.
For example, each cluster in the GDN requires 300 GB of storage. You can purchase a 500 GB of mainland China storage plan to deduct 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 300 GB of China (Hong Kong) and regions outside China storage plan to deduct 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.