Create a serverless cluster

Updated at:

Create a serverless cluster that scales compute resources automatically. You do not need to specify fixed node specifications for compute nodes; you only set the scaling limits for the number of read-only nodes and the PolarDB Capacity Unit (PCU) range per node. Based on the actual workload, the system automatically adjusts the number of PCUs of each node in the cluster and the number of read-only nodes within the ranges that you set.

Note
  • (Recommended) If you already have a PolarDB for MySQL cluster, enable the serverless feature for it directly. For instructions, see Enable serverless for fixed-specification clusters.

  • (Recommended) If you have another database and need to use the serverless feature, use Data Transmission Service (DTS) to migrate the original database to the new serverless cluster. For details, see Overview.

Prerequisites

You have registered and logged on to an Alibaba Cloud account. For instructions, see Register and log on to an Alibaba Cloud account.

Usage notes

  • Database engine does not support MySQL 5.6.

  • CPU architecture is fixed as x86. Yitian ARM is not supported.

Step 1: Basic configuration

The basic configuration covers purchasing requirements, such as the billing method and the region and zone, and cluster resources, such as the database engine and the resource scaling range.

Parameter

Description

Billing Method

Serverless

Region

Select a nearby region to reduce network latency. You cannot change the region after you purchase the cluster. For more information, see Regions and zones.

Note

Make sure that the PolarDB cluster and the Elastic Compute Service (ECS) instances that you want to connect are created in the same region. Otherwise, they can communicate only over the Internet, not over the internal network, which prevents optimal performance.

Creation Method

Create Primary Cluster

Database Engine

Select the MySQL engine version that meets your requirements. For a version comparison, see Feature comparison of PolarDB for MySQL 5.6, 5.7, and 8.0.

  • MySQL 5.7

  • MySQL 8.0.2

  • MySQL 8.0.1

Database Edition

Select the product edition that meets your requirements. For an edition comparison, see Differences between Enterprise Edition and Standard Edition.

  • Enterprise Edition

  • Standard Edition

Primary Zone

A zone is an independent physical area within a region. There are no substantive differences between zones.

Note
  • You can create the PolarDB cluster and ECS instances in the same zone or in different zones.

  • Select only the primary zone. The system automatically selects the secondary zone.

Network Type

Configure a Virtual Private Cloud (VPC) and a vSwitch.

  • If you have created a VPC that meets your network plan, select that VPC. For example, if you have created an ECS instance and its VPC meets your plan, select that VPC.

  • If you have not created a VPC that meets your network plan, you can use the default VPC and vSwitch:

    • Default VPC:

      • It is unique within the selected region.

      • Its subnet mask is 16 bits, such as 192.168.0.0/16, and it provides up to 65,536 private IP addresses.

      • It does not count against the VPC quota that Alibaba Cloud allocates to you.

    • Default vSwitch:

      • It is unique within the selected zone.

      • Its subnet mask is 20 bits, such as 192.168.0.0/20, and it provides up to 4,096 private IP addresses.

      • It does not count against the quota for vSwitches that you can create in the VPC.

  • If the default VPC and vSwitch do not meet your requirements, create a VPC and a vSwitch of your own. For details, see Create and manage a VPC.

Note

Make sure that the PolarDB cluster and the ECS instances that you want to connect are created in the same VPC. Otherwise, they cannot communicate over the internal network, which prevents optimal performance.

HA Mode

PolarDB provides multiple high availability modes. After you enable the hot standby storage cluster feature for a PolarDB cluster, a hot standby storage cluster is created in the secondary zone of the region in which the PolarDB cluster resides or in a different data center in the same zone. The hot standby storage cluster has independent storage resources. Whether the hot standby storage cluster has independent compute resources varies based on the high availability mode. When the PolarDB cluster in the primary zone fails, the hot standby storage cluster immediately takes over and handles read and write operations and storage tasks.

Note
  • For more information about the hot standby storage cluster and related solutions, see High availability modes (hot standby clusters).

  • Rules for changing high availability modes:

    • You cannot directly change the high availability mode of a cluster from Double Zones (Hot Standby Storage Cluster Enabled) or Double Zones (Hot Standby Storage and Compute Clusters Enabled) to Single Zone (Hot Standby Storage Cluster Disabled).

      For such change of the high availability mode, we recommend that you purchase a new cluster and select the Single Zone (Hot Standby Storage Cluster Disabled) high availability mode for the cluster. Then, migrate the existing cluster to the new cluster by using Data Transmission Service (DTS). For information about how to migrate an existing cluster to a new cluster, see Migration between PolarDB for MySQL clusters.

    • You can select the Three Zones high availability mode only when you purchase a new cluster. You cannot change the high availability mode of a cluster from Three Zones to other high availability modes and vice versa.

  • You can manually change the high availability mode of a cluster from Single Zone (Hot Standby Storage Cluster Disabled) to a different high availability mode. For more information, see High availability modes (hot standby clusters).

Set the serverless cluster resource scaling range

  • Minimum Read-only Nodes: Set the minimum number of read-only nodes that can be added. Valid values: 0 to 15.

  • Maximum Read-only Nodes: Set the maximum number of read-only nodes that can be added. Valid values: 0 to 15.

Note
  • The number of read-only nodes automatically increases or decreases within the lower and upper limits that you set, based on the actual workload. For details about the scaling policy, see Scaling.

  • (Recommended) To ensure high availability of the serverless cluster, set Minimum Read-only Nodes to 1.

  • Minimum PCUs per Node: Set the lower limit for the number of PCUs for each node in the cluster. Valid values: 0.25 PCU to 31 PCUs.

  • Maximum PCUs per Node: Set the upper limit for the number of PCUs for each node in the cluster. Valid values: 1 PCU to 32 PCUs.

Note
  • PCUs are the unit for second-level billing and resource scaling for the serverless feature. One PCU is approximately equal to 1 core and 2 GB of memory. The PCUs of a node is dynamically adjusted within the specified range based on the workloads. The minimum granularity for scaling is 0.5 PCUs.

  • Example: If you set Minimum PCUs per Node to 2 PCUs and Maximum PCUs per Node to 16 PCUs, the default specification of the primary node and the read-only nodes in the serverless cluster is 2 PCUs (approximately 2 cores and 4 GB of resources). When the system detects an increase in workload, it automatically increases the number of PCUs of the primary node or the read-only nodes. Based on your settings, the number can increase to a maximum of 16 PCUs (approximately 16 cores and 32 GB of resources).

Enable No-activity Suspension

If your serverless cluster does not receive requests within specific periods of time, you can configure the automatic start and stop feature for the instance. After you enable this feature and if no service is connected to the cluster within the period defined by the Detection Period for No-activity Suspension parameter, the cluster automatically enters the suspended state. During the suspension period, you are still charged for the storage space on a pay-as-you-go basis. If any service is connected to the cluster, the cluster immediately starts.

Note

You cannot set Detection Period for No-activity Suspension on the purchase page. The detection period is set to 60 minutes by default. After you purchase the cluster, you can modify it on the cluster details page. For instructions, see Set automatic start for or manually start a serverless cluster.

Storage Type

  • Enterprise Edition supports PSL5 and PSL4 storage types:

    • PSL5: The storage type supported in earlier versions of the PolarDB cluster. It is the default storage type for PolarDB clusters purchased before June 7, 2022. It delivers high performance and greater reliability and availability.

    • PSL4: A newly launched storage type for the PolarDB cluster. It uses Alibaba's self-developed Smart-SSD technology to compress and decompress stored data at the physical SSD level, which lowers the storage price per unit of capacity while keeping the performance impact under control.

  • Standard Edition supports PSL5, PSL4, and ESSD:

    • PSL5: The storage type supported in earlier versions of the PolarDB cluster. It is the default storage type for PolarDB clusters purchased before June 7, 2022. It delivers high performance and greater reliability and availability.

    • PSL4: A newly launched storage type for the PolarDB cluster. It uses Alibaba's self-developed Smart-SSD technology to compress and decompress stored data at the physical SSD level, which lowers the storage price per unit of capacity while keeping the performance impact under control.

    • ESSD: A newly introduced ultra-high-performance cloud disk from Alibaba Cloud. Built on the next-generation distributed block storage architecture with 25 GE networking and RDMA technology, an ESSD delivers up to 1 million random read/write IOPS per disk and lower single-path latency. ESSDs are available in the following types:

      • PL0 ESSD: The PL0 performance level of ESSDs.

      • PL1 ESSD: Compared with PL0 ESSDs, PL1 ESSDs provide 5 times the IOPS and approximately 2 times the throughput.

      • PL2 ESSD: Compared with PL1 ESSDs, PL2 ESSDs provide approximately 2 times the IOPS and throughput.

      • PL3 ESSD: Compared with PL2 ESSDs, PL3 ESSDs provide up to 10 times the IOPS and 5 times the throughput. PL3 ESSDs suit use cases that demand extremely high concurrent I/O performance and highly stable read/write latency.

      • ESSD AutoPL: Compared with PL0, PL1, PL2, and PL3 ESSDs, ESSD AutoPL decouples IOPS from capacity. You can configure and adjust IOPS on demand to reduce the overall total cost of ownership (TCO).

        Important
        • For details about ESSD performance, see ESSDs.

        • When the storage space of a disk is full, the disk is locked and becomes read-only. To prevent data corruption caused by full storage space, 3 GB of space is reserved.

        If you select ESSD AutoPL, you can configure Provisioned IOPS of AutoPL Disk to increase IOPS beyond the initial maximum of 50,000. The maximum provisioned IOPS is 50,000, so the theoretical maximum total IOPS of an ESSD AutoPL disk is 100,000.

Note
  • ESSDs support Change ESSD performance.

  • To switch from PSL5 storage to PSL4 storage, purchase a new cluster and migrate the data using either a migration tool like Data Transmission Service (DTS) or a major version upgrade.

Step 2: Advanced options (optional)

The advanced options include the cluster name, resource group, and database table name case-sensitivity.

Parameter

Description

Cluster Name

  • Auto-generated: The system generates a cluster name automatically. You can change the name after the cluster is created.

  • Custom: Enter a cluster name. The name must meet the following requirements:

    • It cannot start with http:// or https://.

    • It must contain 2 to 256 characters.

      If you leave the name blank, the system generates a cluster name automatically. You can change the name after the cluster is created.

Resource Group

Select a target resource group from the resource groups that you created. For instructions, see Create a resource group.

Note

A resource group is a container that manages a set of related resources under a single Alibaba Cloud account. A resource can belong to only one resource group. For details, see Manage permissions with resource groups.

Time Zone

Set the cluster time zone. The default time zone is UTC+08:00.

Table name case-sensitivity

Set whether cluster table names are case-sensitive.

  • Case-insensitive (default)

  • Case-sensitive

Note
  • You cannot modify this parameter after the cluster is created. Choose carefully.

  • If your local database is case-sensitive, select Case-sensitive to simplify data migration.

Step 3: Confirm the order

Confirm the overall cluster configuration and specify the purchase quantity. Make sure that all settings meet your requirements.

  1. Review the selected configurations.

  2. Specify the cluster Quantity. The default value is 1.

    Note

    You can create up to 50 clusters at a time, which suits use cases such as batch game server launches.

  3. Read the Product Terms of Service, the Service Level Agreement (SLA), and the product-specific terms that you selected on this page, if any.

  4. If you have no questions, click Buy Now.

    After the purchase is complete, it takes 10 to 15 minutes to create the cluster. You can then view the new cluster in the cluster list.

    Note
    • When the cluster status is Creating, the cluster may not be fully created and is unavailable. You can use the cluster only when its status is Running.

    • Make sure that you selected the correct region. Otherwise, you cannot view the cluster that you created.