A global database network (GDN) consists of multiple PolarDB clusters that are deployed across regions around the world. Data is synchronized across all clusters in each GDN. GDNs enable applications that are deployed in different regions to access databases with low latency and high stability. This topic describes how to add and remove secondary clusters.

Considerations

  • Clusters in a GDN must meet the following requirements:
    • The edition of the cluster is Cluster Edition.
    • The version of the cluster is PolarDB for MySQL 8.0.
  • You can only create secondary clusters. You cannot specify existing clusters as secondary clusters.

Pricing

The cross-region data transfer traffic within a GDN is free. You are charged for only each PolarDB cluster that uses the GDN feature. For more information about the pricing of PolarDB clusters, see Billable items.

Add a secondary cluster

  1. Log on to the PolarDB console.

  2. Find the GDN to which you want to add the secondary cluster and click Add Secondary Cluster in the Actions column.
    1
    Note You cannot specify existing clusters as secondary clusters.
  3. On the buy page, select Subscription or Pay-as-you-go.
  4. Specify the parameters that are listed in the following table.
    Parameter Description
    Region The region where the cluster is deployed. You cannot change the region after the cluster is created.
    Note Make sure that the PolarDB cluster and the Elastic Compute Service (ECS) instance to be connected are deployed in the same region. Otherwise, the cluster and the ECS instance cannot communicate with each other over the internal network to achieve optimal performance.
    Create Type The type of cluster to be created. Select Create Secondary Cluster.
    GDN The GDN in which you want to create a secondary cluster.
    Note By default, the GDN that you select before you create the secondary cluster is used.
    Primary Availability Zone The primary zone of the cluster.
    • Each zone is an independent geographical location in a region. All of the zones in a region provide the same services.
    • You can deploy your PolarDB cluster and ECS instance in the same zone or in different zones.
    • You need to specify only the primary zone. The system automatically selects a secondary zone.
    Network Type The type of network. The value of this parameter is VPC. Keep the default setting.
    Note Before you use the classic network, you must select a virtual private cloud (VPC). After the cluster is created, configure the classic network. For more information, see VPC-facing endpoints and public-facing endpoints.
    VPC

    VSwitch

    Make sure that the PolarDB cluster and the ECS instance to be connected are deployed in the same VPC. Otherwise, the cluster and the ECS instance cannot communicate over the internal network. This compromises the performance of the cluster.
    • If you have created a VPC that meets your requirements, select the VPC. For example, if you have created an ECS instance and the VPC where the ECS instance is deployed meets your requirements, select the VPC.
    • Otherwise, use the default VPC and vSwitch.
      • Default VPC:
        • The default VPC is a unique VPC in the selected region.
        • The default VPC uses a 16-bit subnet mask. For example, the CIDR block 172.31.0.0/16 provides up to 65,536 internal IP addresses.
        • The default VPC is not included in the total number of VPCs that you can create.
      • Default vSwitch:
        • The default vSwitch is a unique vSwitch in the selected zone.
        • The default VPC uses a 20-bit subnet mask. For example, the CIDR block 172.16.0.0/20 provides up to 4,096 internal IP addresses.
        • The default vSwitch is not included in the total number of vSwitches that you can create.
    • If the default VPC and vSwitch do not meet your business requirements, you can create a VPC and a vSwitch. For more information, see Work with VPCs.
    Compatibility Only MySQL 8.0 is supported. Keep the default setting.
    Edition Only Cluster (2-16 Nodes) (Recommended) is supported. Keep the default setting.
    Node Specification Specify the node specification based on your business requirements. For more information, see Specifications of compute nodes.
    Nodes By default, each Standard (2-16 Nodes) (Recommended) cluster consists of one primary node and one read-only node. The two nodes have the same specifications. Keep the default setting.
    Note If the primary node fails, the system uses the read-only node as the primary node and creates another read-only node. For more information about read-only nodes, see Architecture.
    Storage Cost The storage cost. Keep the default setting. You are charged for the used storage on an hourly basis. For more information, see Specifications and pricing.
    Note You do not need to specify a storage capacity when you create a cluster. The system automatically scales the storage capacity when the amount of data is increased or decreased.
    Time Zone The time zone of the cluster. The default value is UTC+08:00.
    Table Name Case Sensitivity Specifies whether table names are case-sensitive. The default value is Not Case-sensitive. If table names are case-sensitive in the on-premises database, we recommend that you select Case-sensitive. This ensures that you can migrate data in an easy manner.
    Note The value of this parameter cannot be changed after the cluster is created. Proceed with caution.
    Release Cluster The backup retention policy that is used when the cluster is deleted or released. The default value is Retain Last Automatic Backup (Automatic Backup before Release).
    • Retain Last Automatic Backup (Automatic Backup before Release): retains the last backup when you delete the cluster.
    • Retain All Backups: retains all backups when you delete the cluster.
    • Delete All Backups (Cannot be restored): deletes all backups when you delete the cluster.
    Note If you choose to retain backups when you delete the instance, you may be charged for the backups. You can delete the backups to reduce costs. For more information, see Release a cluster.
    Cluster Name
    • The name of the new cluster. It must be 2 to 128 characters in length, and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.
    • If you leave this parameter empty, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.
    Resource Group Select a resource group from available resource groups. For more information, see Create a resource group.
    Note A resource group is a container that contains a group of resources within an Alibaba Cloud account. You can perform centralized management on these resources. A resource belongs to only one resource group. For more information, see Use RAM to create and authorize resource groups.
  5. Specify Purchase Plan and Number, and click Buy Now on the right. The Purchase Plan parameter is required only if you purchase a subscription cluster.
  6. On the Confirm Order page, confirm your order information. Read and accept the terms of service.
    • If Product Type is set to Pay-as-you-go, click Activate Now.
    • If Product Type is set to Subscription, click Pay. On the Purchase page, confirm the order information and payment method, and click Purchase.

    After you complete the payment, it requires 10 to 15 minutes to create the cluster. Then, the newly created cluster is displayed on the Clusters page.

    Note
    • If nodes in the cluster are in the Creating state, the cluster is being created and unavailable. The cluster is available only when it is in the Running state.
    • Make sure that you have selected the region where the cluster is deployed. Otherwise, you cannot view the cluster.
    • To store a large volume of data, we recommend that you purchase PolarDB storage plans . Storage plans are more cost-effective than pay-as-you-go storage. You are offered higher discounts for larger storage capacities. For more information, see Billing method 1: pay-as-you-go.

Remove a secondary cluster

  1. Log on to the PolarDB console.

  2. Find the GDN that you want to manage and click GDN ID/Name.
    ID
  3. In the Clusters section, find the Secondary Cluster that you want to remove and click Detach in the Actions column.
    Note
    • It requires about 5 minutes to remove a secondary cluster.
    • During this process, the endpoints of all clusters in the GDN (including the secondary cluster that is being removed) are available. You can still use the endpoints to access databases.
    • Only secondary clusters can be removed from a GDN. The primary cluster cannot be removed from a GDN.
    • After a secondary is removed from the GDN, the secondary cluster stops synchronizing data from the primary cluster. In this case, the secondary cluster is set to the read/write mode.
    • After a secondary cluster is removed, the cluster cannot be added to the GDN again as a secondary cluster. Proceed with caution.
    Remove a cluster
  4. In the message that appears, click OK.