This topic describes how to purchase a pay-as-you-go cluster in the PolarDB console.

Note If you use an ApsaraDB RDS for MySQL instance, you can create a PolarDB for MySQL cluster by using the Migration from RDS method. The created PolarDB cluster retains the accounts, databases, IP address whitelist, and required parameters of the source ApsaraDB RDS for MySQL instance. For more information, see Create a ApsaraDB PolarDB MySQL-compatible edition cluster by migrating an ApsaraDB RDS for MySQL instance.

Prerequisites

An Alibaba Cloud account is created and is used to log on to the Alibaba Cloud Management Console. For more information, see Register and log on to an Alibaba Cloud account.

Background information

PolarDB for MySQL clusters support three editions: Cluster Edition, Single Node, and Archive Database. For more information about each edition, see Product editions.

Note
  • PolarDB supports virtual private clouds (VPCs). A VPC is an isolated network on Alibaba Cloud. It provides extra protection and is more secure than the classic network.
  • To optimize the performance of PolarDB, you can deploy PolarDB clusters and other Alibaba Cloud services in the same internal network. We recommend that you deploy PolarDB clusters and Elastic Compute Service (ECS) instances in the same VPC to ensure the optimal performance of PolarDB. If your ECS instance is deployed in the classic network, you must migrate the instance to a VPC.

Procedure

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the page, click Create Cluster.
  3. Specify Pay-As-You-Go as the value of the Product Type parameter.
  4. Specify the following parameters.
    Parameter Description
    Region The region where you want to deploy the cluster. After the cluster is created, you cannot change the region.
    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 PolarDB cluster and the ECS instance cannot communicate over a VPC. In this case, the cluster and the ECS instance can communicate only over the Internet. This compromises the performance of the cluster.
    Create Type The method that is used to create a PolarDB cluster.
    • Create Primary Cluster: creates a PolarDB cluster.
    • Create Secondary Cluster: creates a secondary cluster that is deployed in a global database network (GDN). For more information, see Add a secondary cluster.
    • Migration from RDS: creates a cluster by cloning the data of an ApsaraDB RDS instance and synchronizing incremental data from the ApsaraDB RDS instance to the PolarDB cluster. In most cases, this method is used for data migration. The read/write mode of the PolarDB cluster is Read Only before data migration is started. By default, binary logging is enabled. For more information, see Create a ApsaraDB PolarDB MySQL-compatible edition cluster by migrating an ApsaraDB RDS for MySQL instance.
      • RDS Engine Type: the engine type of the source ApsaraDB RDS instance. The value of this parameter can be only MySQL. You do not need to change this value.
      • RDS Engine Version: the version of the source ApsaraDB RDS instance. You can select 5.6 or 5.7.
      • Source RDS Instance: the available source ApsaraDB RDS instances. Read-only instances are excluded.
        Note The list of available source instances excludes read-only instances. You cannot select the ApsaraDB RDS instances for which the Transparent Data Encryption (TDE) or SSL feature is enabled and part of the data is stored in the InnoDB storage engine. When you restore data from a backup file to the PolarDB cluster, the source instance runs as expected.
    • Clone from RDS: creates a PolarDB cluster by cloning the data of a specified RDS instance in a quick manner. For more information, see Create a ApsaraDB PolarDB MySQL-compatible edition cluster by cloning an ApsaraDB RDS for MySQL instance.
      • RDS Engine Type: the engine type of the source ApsaraDB RDS instance. The value of this parameter can be only MySQL. You do not need to change this value.
      • RDS Engine Version: the version of the source ApsaraDB RDS instance. You can select 5.6 or 5.7.
      • Source RDS Instance: the available source ApsaraDB RDS instances. Read-only instances are excluded.
        Note The list of available source instances excludes read-only instances. You cannot select the ApsaraDB RDS instances for which the TDE or SSL feature is enabled and part of the data is stored in the InnoDB storage engine. When you restore data from a backup file to the PolarDB cluster, the source instance runs as expected.
    • Restore from Recycle: creates a cluster by restoring a backup file of a deleted cluster from the recycle bin.
      • Source Version: the version of the cluster that is deleted.
      • Deleted Clusters: the name of the cluster that is deleted.
      • Backup History: the backup file that you want to restore.
    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 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 value of this parameter is VPC. You do not need to change this value.
    VPC

    VSwitch

    Make sure that the PolarDB cluster and the ECS instance to be connected to the cluster are deployed in the same VPC. Otherwise, the cluster and the ECS instance cannot communicate over a VPC. As a result, the cluster performance is compromised.
    • If you have created a 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 CIDR block of the default VPC uses a 16-bit subnet mask. For example, the CIDR block of the default VPC can be 172.168.0.0/16. This CIDR block provides up to 65,536 private 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 CIDR block of the default vSwitch uses a 20-bit subnet mask. For example, the CIDR block of the default vSwitch can be 172.168.0.0/20. This CIDR block provides up to 4,096 private 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 Work with VPCs.
    Compatibility
    • MySQL 8.0: fully compatible with MySQL 8.0. MySQL 8.0 supports parallel queries. In specific scenarios, the database performance increases by 10 times. For more information, see Parallel query.
    • MySQL 5.7: fully compatible with MySQL 5.7.
    • MySQL 5.6: fully compatible with MySQL 5.6.
    • PostgreSQL 11: fully compatible with PostgreSQL 11.
    • Compatible with Oracle Syntax: highly compatible with the Oracle syntax. For more information, see Oracle compatibility.
    Edition
    You can select Cluster (2-16 Nodes) (Recommended), Archive Database (High Compression Ratio), or Single Node (Starter). For more information, see Product editions.
    Note
    • You can select the Single Node (Starter) edition only if Create Type is set to Create Primary Cluster and Compatibility is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6.
    • You can select the Archive Database (High Compression Ratio) edition only if Create Type is set to Create Primary Cluster and Compatibility is set to MySQL 8.0.
    Node Specification
    • If your cluster edition is Cluster (2-16 Nodes) (Recommended) or Archive Database (High Compression Ratio), you can select node specifications based on your business requirements.
    • If your cluster edition is Single Node (Starter), the value of this parameter is set to 4 Core, 8 GB (Burstable Performance) and cannot be changed.

    For more information about the specifications of compute nodes, see Specifications of compute nodes.

    Nodes
    • If your source cluster edition is Cluster (2-16 Nodes) (Recommended), the system automatically creates a primary node and a read-only node that have the same specifications. You do not need to configure this parameter.
      Note If the primary node becomes faulty, 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.
    • If your source cluster edition is Single Node (Starter) or Archive Database (High Compression Ratio), the system automatically creates a primary node. You do not need to configure this parameter.
    Storage Cost You do not need to configure this parameter. You are charged for the amount of storage that is consumed by your data on an hourly basis. For more information, see Storage pricing.
    Note You do not need to specify a storage capacity when you create a cluster. The system automatically scales up or scales down the storage capacity when the amount of data increases or decreases.
    Time Zone The time zone of the cluster. The default time zone is UTC+08:00 (default).
    Note This parameter is available only if Compatibility is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6 for the PolarDB cluster.
    Table Name Case Sensitivity Specifies whether table names in the cluster are case-sensitive. The default value is Not Case-sensitive (Default). If table names in your on-premises database are case-sensitive, select Case-sensitive. This simplifies the process of data migration.
    Note
    • This parameter is available only if Compatibility is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6 for the PolarDB cluster.
    • 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 delete the cluster.
    • Delete All Backups (Cannot be Restored): retains no backups after you delete the cluster.
    Note
    • This parameter is available only if the Compatibility parameter is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6 for the PolarDB cluster.
    • If you need to retain backups after you delete or release the cluster, you may be charged additional fees. You can delete the backups to reduce costs. For more information, see Billing rules for data backup.
    Enable TDE Specifies whether to enable Transparent Data Encryption (TDE). After TDE is enabled, PolarDB encrypts the data files of your cluster. You do not need to modify the code to allow access to your cluster. The read and write performance is reduced by 5% to 10%.
    Note
    • This parameter is available only if the Compatibility parameter is set to PostgreSQL 11 or Compatible with Oracle Syntax.
    • If the Compatibility parameter for a cluster is set to MySQL 8.0, MySQL 5.7, or MySQL 5.6, you can create the cluster and then enable the TDE feature. For more information about this operation, see Configure TDE.
    • You cannot disable the TDE feature after the TDE feature is enabled.
    Cluster Name The name of the cluster. The name must meet the following requirements:
    • The name cannot start with http:// or https://.
    • The name must be 2 to 256 characters in length.

    If you do not configure this parameter, the system automatically generates a cluster name. You can change the 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 contains a group of resources within an Alibaba Cloud account. You can 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.
  5. Specify the Number parameter and click Buy Now.
    Note You can create a maximum of 50 clusters at a time. This allows you to create multiple clusters in specific scenarios. For example, you can enable multiple game servers at a time.
  6. On the Confirm Order page, confirm your order information. Read and accept the terms of service, and then click Activate Now.

    After you complete the activation, it takes 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 if 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 subscription PolarDB storage plans to store a large amount of data. Storage plans are more cost-effective than pay-as-you-go storage. You are offered larger discounts if you purchase storage plans that provide larger storage capacities. For more information, see Together with storage plans.

What to do next

Configure an IP whitelist

Related operations

API Description
CreateDBCluster Creates a PolarDB cluster.
DescribeDBClusters Queries PolarDB clusters.
DescribeDBClusterAttribute Queries the information about a specified PolarDB cluster.