A global database network (GDN) consists of multiple PolarDB clusters that are deployed in multiple regions across the globe. Data is replicated across all clusters in each GDN. This allows applications that are deployed across different regions to access a database that is local to their region, providing reliable access with low latency. This topic describes how to add and remove secondary clusters.

Prerequisites

Create a GDN

Usage notes

  • Clusters in a GDN must meet the following requirements:
    • Your cluster must be a PolarDB for MySQL 8.0 cluster or a PolarDB for MySQL 5.6 cluster whose kernel minor version is 5.6.1.0.27 or later.
    • The primary cluster and secondary clusters must have the same database engine version, that is, MySQL 8.0 or MySQL 5.6.
  • You can create only secondary clusters. You cannot specify existing clusters as secondary clusters.
  • 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 with low latency. 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.
  • A GDN contains a single primary cluster and up to four secondary clusters. Multiple clusters can be deployed within the same zone of a region.
    Note To add more secondary clusters,submit a ticket.
  • A cluster belongs to only one GDN.
  • Clusters in the GDN do not support specifications of 2 cores and 4 GB of memory or 2 cores and 8 GB of memory.

Fees

You are not charged for the traffic that is generated by cross-region data transmission within a GDN. You are charged for PolarDB clusters in the GDN. For more information about the pricing rules of PolarDB clusters, see Billable items.

Add a secondary cluster

  1. Log on to the PolarDB console.
  2. In the left-side navigation pane, click Global Database Network.
  3. Find the GDN to which you want to add a secondary cluster and click Add Secondary Cluster in the Actions column.
    1
    Note You cannot specify existing clusters as secondary clusters.
  4. On the buy page, select Subscription or Pay-as-you-go.
  5. Specify the parameters that are listed in the following table.
    Parameter Description
    Region The region where you want to create a cluster. After the cluster is created, you cannot change the region.
    Note Make sure that the PolarDB cluster and the ECS instance to which you want to connect are deployed in the same region. Otherwise, the PolarDB cluster and the ECS instance can communicate only over the Internet, which results in decreased cluster 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 where the cluster is deployed.
    • A zone is an independent geographical location in a region. All of the zones in a region provide the same level of service performance.
    • 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 This parameter can be set only to VPC. You do not need to change this parameter value.
    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 Cluster endpoints and primary endpoints.
    VPC

    VSwitch

    Make sure that the PolarDB cluster and the ECS instance to which you want to connect are deployed in the same VPC. Otherwise, the cluster and the ECS instance cannot communicate over a VPC, which results in decreased cluster performance.
    • If you have an existing VPC that meets your network requirements, select the VPC. For example, if you have created an ECS instance and the VPC to which the ECS instance is connected meets your network requirements, select this VPC.
    • Otherwise, use the default VPC and the default vSwitch.
      • Default VPC:
        • Only one VPC is specified as the default VPC in the region that you select.
        • 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 does not consume the quota of the VPCs that you can create on Alibaba Cloud.
      • Default vSwitch:
        • Only one vSwitch is specified as the default vSwitch in the zone that you select.
        • 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 does not consume the quota of the vSwitches that you can create in a VPC.
    • If the default VPC and vSwitch cannot meet your business requirements, you can create your own VPC and vSwitch. For more information, see Create and manage a VPC.
    Compatibility MySQL 8.0 and MySQL 5.6 are supported. The value of this parameter must be specified the same as the compatibility of the primary cluster.
    Edition This parameter can only be set to Cluster (2-16 Nodes) (Recommended). You do not need to change this parameter value.
    Node Specification Specify the node specification based on your business requirements. For more information, see Specifications of compute nodes.
    Nodes By default, each Cluster (2-16 Nodes) (Recommended) consists of one primary node and one read-only node. Both of the nodes have the same specifications. Keep the default setting.
    Note If the primary node fails, the system upgrades the read-only node to a primary node and creates another read-only node. For more information about read-only nodes, see Architecture.
    Storage Cost The storage cost. You do not need to change this parameter value. You are charged by hour for the actual volume of storage space that is consumed. For more information, see Billable items.
    Note You do not need to specify the storage capacity when you create a cluster. The system 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 the table names of your on-premises database are case-sensitive, we recommend that you select Case-sensitive. This ensures that data is migrated smoothly.
    Note After the cluster is created, you cannot change the value of this parameter. We recommend that you configure this parameter based on your business requirements.
    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) (Default).
    • Retain Last Automatic Backup (Automatic Backup before Release) (Default): retains the last backup when you release the cluster.
    • Retain All Backups: retains all backups when you release the cluster.
    • Delete All Backups (Cannot be restored): retains no backups when you release the cluster.
    Note You may be charged for the backups that are retained after you delete or release a cluster. 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 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 group of resources that belong to an Alibaba Cloud account. Resource groups allow you to manage these resources in a centralized manner. A resource belongs to only one resource group. For more information, see Use RAM to create and authorize resource groups.
  6. If you create a subscription cluster, set Purchase Plan and Number and click Buy Now on the right.
  7. 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 your 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.
    • We recommend that you purchase PolarDB storage plans if you want to store a large volume of data. Storage plans are more cost-effective than pay-as-you-go storage. Larger storage plans provide more storage for lower costs. For more information, see Billing method 1: pay-as-you-go.

Remove a secondary cluster

  1. Log on to the PolarDB console.
  2. In the left-side navigation pane, click Global Database Network.
  3. Find the GDN from which you want to remove a secondary cluster and click GDN ID/Name.
    ID
  4. 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 cluster is removed from a GDN, the secondary cluster stops replicating data from the primary cluster. In this case, the secondary cluster is set to the read/write mode.
    • After a secondary cluster is removed from a GDN, the cluster can no longer be used as a secondary cluster for the GDN. Proceed with caution.
    Remove a cluster
  5. In the dialog box that appears, click OK.