A global database network (GDN) consists of Apsara PolarDB clusters distributed in different global regions. Data is synchronized across all clusters in the network. When your business is deployed in multiple regions, you can use a GDN to gain instant and reliable access to databases. This topic describes how to create a GDN and a secondary cluster.

Prerequisites

  • The version of Apsara PolarDB should be PolarDB for MySQL 8.0.
  • A primary Apsara PolarDB cluster was created. For more information about how to create an Apsara PolarDB cluster, see Create a PolarDB MySQL cluster.
  • The kernel minor version of the primary cluster must be the latest. For more information about version upgrade, see Upgrade the minor version.

Global Database Network supports read/write splitting

Multinational corporations run their services in multiple regions and deploy databases in a central region. If global applications access the central databases across regions, network latency may result in poor performance. To solve this issue, Global Database Network (GDN) uses the asynchronous replication mechanism to transfer data from the primary cluster to secondary clusters. This allows data synchronization across clusters and reduces the latency to less than two seconds. Databases can process read requests from applications in non-central regions with minimum latency.

1

GDN also provides a read/write splitting feature for all clusters. This feature allows you to create a secondary cluster in up to five non-central regions. When applications in these regions send requests to the databases, GDN forwards the read requests to the secondary cluster in the same region as the applications, and forwards write requests to the primary cluster in the central region. You can use GDN to easily build an application architecture in global regions. You do not need to modify application code to split read and write requests.

2

Precautions

  • A GDN contains one primary cluster and up to four secondary clusters.
  • The primary cluster and secondary clusters are independent of each other and have different specifications, whitelists, and parameter values.
  • A cluster can only belong to one GDN.
  • A GDN can cover up to five regions. Multiple clusters can exist in the same region and zone.
  • Secondary clusters can only be created. You cannot add existing clusters as secondary clusters.

Billing

GDN is free of charge during public preview. You may be charged after commercialization of GDN. For more information about the billing for creating a cluster, see Specifications and pricing.

Create a GDN

  1. Log on to the Apsara PolarDB console.
  2. In the left-side navigation pane, click Global Database Network.
  3. On the Global Database Network page, click Create GDN.
    1
  4. In the Create GDN dialog box, configure the following parameters.
    Parameter Description
    Name Enter the name of the GDN that helps identify your business. The GDN name does not need to be unique.
    Primary Region Select the region where the primary cluster resides.
    Note Select the primary cluster and the region where the primary cluster resides.
    Primary Cluster Select the primary cluster.
    Note Only Apsara PolarDB MySQL 8.0 is supported.
  5. After you configure the preceding parameters, click OK.

Create a secondary cluster

  1. Log on to the Apsara PolarDB console.
  2. In the left-side navigation pane, click Global Database Network.
  3. Select the target GDN ID and click Add Secondary Cluster in the Actions column.
    1
    Note You cannot add an existing cluster as a secondary cluster in a GDN.
  4. On the Apsara PolarDB buy page, select Subscription or Pay-As-You-Go.
    Note
    • Subscription: An upfront payment is required for the compute nodes (one primary node and one read-only node) when you create the cluster. Storage consumed by your database is billed in GB/hour increments and the charges are deducted from your account on an hourly basis. The Subscription method is more cost-effective if you plan to use the new cluster for a long period of time. The longer the subscription period, the greater the discount.
    • Pay-As-You-Go: This method does not require any upfront payment. Compute nodes and storage consumed by your database are billed on an hourly basis and the charges are deducted from your account on an hourly basis. The Pay-As-You-Go method is suitable if you only want to use the new cluster for a short period of time. You can save costs by releasing clusters as needed.
  5. Configure the following parameters.
    Section Parameter Description
    Basic Region Select the region where you want to create the secondary cluster. You cannot change the region after the cluster is created.
    Note Make sure that you deploy your Apsara PolarDB cluster in the same region as the ECS instances to which you want to connect. Otherwise, the instances cannot communicate through the internal network and optimal performance cannot be achieved.
    Create Type Select Create Secondary Cluster.
    GDN Select the GDN in which you want to create the secondary cluster.
    Note By default, the GDN that you select before you create the secondary cluster is displayed.
    Primary Availability Zone Select the primary zone in which you want to create the secondary cluster.
    • Each zone is an independent physical location that resides in a region. No difference exists between zones.
    • You can deploy your Apsara PolarDB cluster and the ECS instance in the same zone or in different zones.
    • You only need to select the primary zone. The system automatically selects a secondary zone.
    Network Type Only VPC is supported.
    VPC Select the VPC in which you want to create the secondary cluster. Make sure that you deploy your Apsara PolarDB cluster in the same VPC as the ECS instances to which you want to connect. Otherwise, the instances cannot communicate through the internal network and optimal performance cannot be achieved.
    VSwitch Select the VSwitch in which you want to create the secondary cluster.
    Instance Compatibility Only MySQL 8.0 is supported.
    Node Specification Select the specifications as needed. All nodes in the Apsara PolarDB cluster are dedicated nodes with stable and reliable performance. For more information about specifications, see Specifications and pricing.
    Note The specifications of secondary clusters do not need to be the same as those of the primary cluster.
    Nodes
    • Use the default setting. By default, a cluster contains one primary node and one read-only node. The specifications of the read-only node are the same as those of the primary node.
    • If the primary node fails, the system will promote the read-only node as the primary node, and generate a new read-only node.
    • For more information about read-only nodes, see Architecture.
    Storage Cost Use the default setting. The system will charge you on an hourly basis based on the actual data usage. For more information, see Specifications and pricing.
    Purchase Plan Purchase Plan Select the purchase plan of the secondary cluster.
    Note This parameter is only available when you select Subscription.
    Number Select the number of secondary clusters that you want to purchase.
    Note A GDN supports a maximum of four secondary clusters.
  6. Click Buy Now.
  7. On the Confirm Order page, confirm your order information, read and accept the ApsaraDB for PolarDB Subscription Agreement of Service, and then click Pay.
  8. On the Purchase page, confirm the order information and payment method, and then click Purchase.

FAQ

Q: How many GDNs can I create with an Alibaba Cloud account?

A: The number of GDNs that you can create is not limited.