All Products
Search
Document Center

PolarDB:Create a serverless cluster

Last Updated:Sep 05, 2023

When you create a serverless cluster, the specifications for each compute node are not required. You only need to specify the maximum and minimum numbers of read-only nodes and the PCU range for a single-node. PolarDB for MySQL automatically scales the primary or read-only nodes of each serverless cluster within the specified range. This topic describes how to create a serverless cluster.

Note
  • If you use an existing PolarDB for MySQL cluster, we recommend that you enable the serverless feature for the cluster. For more information, see Create a serverless cluster with defined specifications.
  • If you use other database services and want to use the serverless feature, we recommend that you use Data Transmission Service (DTS) to migrate data from the database services to a new serverless cluster. For more information, see Overview.

Prerequisites

You have created an Alibaba Cloud account and logged on the console with the account. For more information, see Register and log on to an Alibaba Cloud account.

Step 1: Complete the settings in the Basic Configurations step

In the Basic Configurations step, you can configure the basic parameters and resources that are required to purchase a cluster. The basic parameters include Billing Method, Region, and Zone. The basic resources include the database engine, scaling range of resources, and storage. After you complete the settings in the Basic Configurations step, click Next.

  1. Go to the PolarDB cluster buy page.
  2. Set Billing Method to Serverless.
  3. Select Region and Zone.
    Select a region that is close to your geographical location to reduce latency. After a cluster is created, the region of the cluster cannot be changed. For more information, see Regions and Zones.
    Note
    • Make sure that the PolarDB for MySQL 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 degrades cluster performance.
    • You can deploy your PolarDB for MySQL cluster and ECS instance in the same zone or in different zones. If you create a PolarDB for MySQL cluster in the same zone as the ECS instance, the network latency is reduced and the access speed is increased.
  4. Select Database Engine.
    PolarDB for MySQL supports the following database engines: MySQL 8.0.2, MySQL 8.0.1, and MySQL 5.7.
  5. Set the scaling range of resources in the serverless cluster.
    • Minimum Read-only Nodes: the minimum number of read-only nodes that can be added. To ensure high availability of the serverless cluster, we recommend that you set the minimum number of read-only nodes to 1. Valid values: 0 to 7.
    • Maximum Read-only Nodes: the maximum number of read-only nodes that can be added. The number of read-only nodes automatically increases or decreases based on your workloads. Valid values: 0 to 7.
    • Minimum PCUs per Node: the minimum number of PCUs per node in the cluster. PolarDB for MySQL serverless clusters are billed and scaled in PCUs (approximately equal to 1 core and 2 GB of memory). PCUs dynamically increases or decreases within the specified range based on your workloads. Valid values: 1 PCU to 31 PCUs.
    • Maximum PCUs per Node: the maximum number of PCUs per node in the cluster. PolarDB for MySQL serverless clusters are billed and scaled in PCUs (approximately equal to 1 core and 2 GB of memory). PCUs dynamically increases or decreases within the specified range based on your workloads. Valid values: 1 PCU to 32 PCUs.
  6. Enable or disable the no-activity suspension feature for the serverless cluster. The feature is disabled by default.
  7. Configure the Storage Type parameter.
    PolarDB for MySQL supports the PSL5 and PSL4 storage types.
    • PSL5: the storage type supported by historical versions of PolarDB for MySQL. This was the default storage type for PolarDB clusters purchased before June 7, 2022. It delivers higher performance, reliability, and availability.
    • PSL4: a new storage type for PolarDB for MySQL. Standard Edition uses the Smart-SSD technology developed in-house by Alibaba Cloud to compress and decompress data at the SSD disk level. This storage type can minimize the storage costs of data while maintaining a high disk performance. This storage type is also called PSL4.
      Note The storage type of existing clusters cannot be changed to Standard Edition. To use Standard Edition, we recommend that you purchase a new cluster, set the storage type to Standard Edition, and then migrate data to the new cluster.

    For more information about the two storage types, see Comparison between PSL4 and PSL5.

Step 2: Complete the settings in the Cluster Configurations step

In the Cluster Configurations step, you can configure settings such as cluster name, network type, and table name case-sensitivity. After you complete the settings in the Cluster Configurations step, click Next.

  1. You can specify Cluster Name or use the system-generated one.
    If you select the system-generated Cluster Name, the system automatically generates a cluster name after the cluster is created. You can modify the system-generated cluster name. If you specify Custom Cluster Name, you must also enter a cluster name. The cluster name must meet the following requirements:
    • It cannot start with http:// or https://.
    • It must be 2 to 256 characters in length.
    • It must start with a letter and can contain letters, digits, periods (.), underscores (_), and hyphens (-).
  2. Set Resource Group.
    Select a resource group from the 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.
  3. Configure the virtual private cloud (VPC) and vSwitch.
    The network type can only be VPC. You do not need to configure this parameter. Make sure that the PolarDB for MySQL cluster is created in the same VPC as the ECS instance to which you want to connect. Otherwise, the cluster and the ECS instance cannot communicate over the internal network to achieve optimal performance.
    • If an existing VPC meets your network requirements, select the VPC. For example, if you have an existing ECS instance and the VPC to which the ECS instance belongs meets your network requirements, select the 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 192.168.0.0/16. This CIDR block provides up to 65,536 private IP addresses.
        • The default VPC does not count towards the quota of 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 192.168.0.0/20. This CIDR block provides up to 4,096 private IP addresses.
        • The default vSwitch does not count towards the quota of vSwitches that you can create in a VPC.
    • If the default VPC and vSwitch cannot meet your business requirements, you can create a custom VPC and vSwitch. For more information, see Create and manage a VPC.
  4. Set Time Zone.
    The time zone of the cluster. The default value is UTC+08:00.
  5. Set Table Name.
    You can specify 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 to simplify the process of data migration.
    Note After the cluster is created, you cannot change the value of this parameter. Take caution when you configure this parameter.

Step 3: Confirm the order

Before the cluster is created, make sure that the selected configurations such as the quantity meet your requirements.

  1. Check the selected configurations.
    To modify the configurations in a step, click the edit icon to go to the step.
  2. Specify Quantity.
    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 deploy multiple game servers at a time.
  3. Read and select the terms of service.
  4. View the total fees and details of the cluster in the lower part of the page. If they are correct, click Buy Now.
  5. On the Purchase page, confirm the order and the payment method, and click Purchase.
    After you complete the payment, wait 10 to 15 minutes. Then, you can view the newly created cluster on the Clusters page.
    Note
    • If some nodes in the cluster are still in the Creating state, the cluster is still being created and is unavailable. The cluster is available only when the cluster is in the Running state.
    • Make sure that you have selected the region where the cluster is deployed. Otherwise, you cannot view the cluster.