Create a serverless cluster

更新时间:
复制 MD 格式

This topic describes how to create a serverless cluster. You do not need to specify fixed specifications for compute nodes. Instead, you only set the scaling ranges for the number of read-only nodes and PolarDB Compute Units (PCUs) per node. The system then automatically adjusts the number of PCUs and read-only nodes within these ranges based on the actual workload.

Note

Prerequisites

You have registered for an Alibaba Cloud account and are logged in. For more information, see Sign up for and log on to an Alibaba Cloud account.

Usage notes

  • Database Engine does not support MySQL 5.6.

  • The CPU architecture is limited to x86. Yitian ARM is not supported.

Step 1: Basic configuration

Configure the basic settings for your cluster, such as the billing method, region, and zone, as well as essential resources like the database engine and the scaling ranges for cluster resources.

Parameter

Description

Billing Method

Serverless

Region

Select a region close to your users to reduce network latency. You cannot change the region after you create the cluster. For more information, see Regions and zones.

Note

To ensure optimal performance, make sure that your PolarDB cluster and the Elastic Compute Service (ECS) instances you want to connect are in the same region. Otherwise, they can only communicate over the public internet, which degrades performance.

Creation Method

Create Primary Cluster

Database Engine

Select a MySQL engine version based on your requirements. For a feature comparison, see Features 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 an edition based on your needs. For a feature comparison, see Comparison between Enterprise Edition and Standard Edition.

  • Enterprise Edition

  • Standard Edition

Primary Zone

A zone is an independent physical area within a region. Zones in the same region have the same service capabilities.

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

  • You only need to select the primary zone. The system automatically selects a secondary zone.

Network Type

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

  • If you have a VPC that meets your network requirements, select that VPC. For example, if you have an ECS instance in a suitable VPC, select that VPC.

  • If you do not have a suitable VPC, you can use the default VPC and vSwitch:

    • Default VPC:

      • The default VPC is unique within your selected region.

      • It has a 16-bit subnet mask, such as 192.168.0.0/16, which provides up to 65,536 private IP addresses.

      • It does not count against your VPC quota.

    • Default vSwitch:

      • The default vSwitch is unique within your selected zone.

      • It has a 20-bit subnet mask, such as 192.168.0.0/20, which provides up to 4,096 private IP addresses.

      • It does not count against the vSwitch quota within the VPC.

  • If the default VPC and vSwitch do not meet your requirements, you can create your own. For more information, see Create and manage a VPC.

Note

To ensure optimal performance, make sure that your PolarDB cluster and the ECS instances that you want to connect are in the same VPC. Otherwise, they cannot communicate over the internal network.

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 Migrate data 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 resource scaling range for the serverless cluster

  • Minimum Read-only Nodes: The minimum number of read-only nodes. Valid values: 0 to 15.

  • Maximum Read-only Nodes: The maximum number of read-only nodes. Valid values: 0 to 15.

Note
  • The number of read-only nodes automatically scales up or down within the specified range based on the workload. For more information about the scaling policy, see Auto scaling.

  • To ensure high availability for your serverless cluster, we recommend setting Minimum Read-only Nodes to 1.

  • Minimum PCUs per Node: The minimum number of PCUs for each node in the cluster. Valid values: 0.25 to 31 PCUs.

  • Maximum PCUs per Node: The maximum number of PCUs for each node in the cluster. Valid values: 1 to 32 PCUs.

Note
  • Serverless uses PCUs as the unit for per-second billing and resource scaling. One PCU is equivalent to approximately 1 vCPU core and 2 GB of memory. The PCUs of a node dynamically scale within the specified range, with a minimum scaling step of 0.5 PCU.

  • Example: If you set Minimum PCUs per Node to 2 and Maximum PCUs per Node to 16, the default specification for each node in the serverless cluster is 2 PCUs (about 2 vCPU cores and 4 GB of memory). When the system detects an increase in workload, it automatically scales up the PCUs of the primary node or read-only nodes. However, the number of PCUs cannot exceed 16.

Enable No-activity Suspension

If your database is idle during specific periods, you can enable this feature. When enabled, the cluster automatically enters a paused state if there are no connections within the specified Detection Period for No-activity Suspension. You are still charged for storage on a pay-as-you-go basis while the cluster is paused. The cluster automatically resumes when a connection is initiated.

Note

You cannot set the Detection Period for No-activity Suspension on the purchase page. It defaults to 60 minutes. After you create the cluster, you can change this setting on the cluster details page. For more information, see Set automatic start or manually start a serverless cluster.

Storage Type

  • Enterprise Edition supports two storage types: PSL5 and PSL4.

    • PSL5 is the storage type supported in earlier versions of PolarDB. This was the default for clusters purchased before June 7, 2022. It offers high performance, reliability, and availability.

    • PSL4 is a newer storage type for PolarDB that uses Alibaba Cloud's self-developed Smart-SSD technology. This technology compresses and decompresses data at the physical SSD level, reducing storage costs per unit of data while maintaining predictable performance.

  • Standard Edition supports PSL5, PSL4, and ESSD.

    • PSL5 is the storage type supported in earlier versions of PolarDB. This was the default for clusters purchased before June 7, 2022. It offers high performance, reliability, and availability.

    • PSL4 is a newer storage type for PolarDB that uses Alibaba Cloud's self-developed Smart-SSD technology. This technology compresses and decompresses data at the physical SSD level, reducing storage costs per unit of data while maintaining predictable performance.

    • ESSD is a new generation of ultra-high-performance cloud disks from Alibaba Cloud. Based on a distributed block storage architecture with 25GE networking and RDMA technology, an ESSD can deliver up to 1 million random IOPS per disk with low latency. ESSDs are available in the following performance levels (PLs):

      • ESSD PL0: The PL0 performance level of ESSDs.

      • ESSD PL1: Compared with PL0, ESSD PL1 provides 5 times the IOPS and about 2 times the throughput.

      • ESSD PL2: Compared with PL1, ESSD PL2 provides about 2 times the IOPS and throughput.

      • ESSD PL3: Compared with PL2, ESSD PL3 provides up to 10 times the IOPS and 5 times the throughput. PL3 ESSDs are suitable for scenarios that require extremely high concurrent I/O performance and stable, low read/write latency.

      • ESSD AutoPL: Unlike other ESSD PLs, ESSD AutoPL decouples IOPS from storage capacity. This allows you to configure and adjust IOPS on demand, reducing your total cost of ownership (TCO).

        Important
        • For more information about the performance of ESSDs, see ESSDs.

        • When an ESSD is full (3 GB of space is reserved to prevent data corruption), the disk is locked and becomes read-only.

        When you select ESSD AutoPL, you can configure the Provisioned IOPS of AutoPL Disk to increase the IOPS beyond the initial maximum of 50,000. The maximum provisioned IOPS is 50,000, for a theoretical total maximum of 100,000 IOPS.

Note

Step 2: Advanced options

Configure advanced settings such as the cluster name, resource group, and table name case-sensitivity.

Parameter

Description

Cluster Name

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

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

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

    • It must be 2 to 256 characters in length.

      If you leave this field empty, a name is automatically generated. You can change the name after creation.

Resource Group

Select a resource group from the list of resource groups.

Note

A resource group is a container that lets you manage a group of related resources under a single Alibaba Cloud account. A resource can belong to only one resource group. For more information, see Resource groups.

Time Zone

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

Table name case-sensitivity

Specifies whether table names are case-sensitive.

  • Case-insensitive (default)

  • Case-sensitive

Note
  • You cannot change this parameter after you create the cluster. Choose carefully.

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

Step 3: Confirm your order

Review the overall cluster configuration and specify the quantity to ensure all settings meet your requirements.

  1. Review the selected configurations.

  2. Specify the Quantity of clusters to create. The default is 1.

    Note

    You can create up to 50 clusters at once. This is useful for scenarios such as batch provisioning game servers.

  3. Read the Product Terms of Service, Service Level Agreement, and any product-specific terms that you selected.

  4. Click Buy Now.

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

    Note
    • You can use the cluster only when its status changes to Running. When the cluster status is Creating, the cluster is not yet fully available.

    • Make sure that you have selected the correct region. Otherwise, you will not see the cluster you created.