All Products
Search
Document Center

PolarDB:Create a serverless cluster

Last Updated:Feb 05, 2025

This topic describes how to create a serverless cluster. When you create a serverless cluster, you do not specify the exact specifications for the compute nodes, but the maximum and minimum numbers of read-only nodes in the cluster and of the PCUs per node. The system automatically adjust the number of PCUs of the nodes in the serverless cluster and the number of read-only nodes within the specified range based on the actual workloads.

Note
  • If you use an existing PolarDB for MySQL cluster, you can enable the serverless feature for the cluster. For more information, see Enable the serverless feature for a cluster with defined specifications.

  • If you use other database services and want to use the serverless feature, you can use Data Transmission Service (DTS) to migrate data from your existing database services to a new serverless cluster. For more information, see Overview.

Prerequisites

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

Step 1: Configure basic settings

In this step, you can configure the basic parameters and resources that are required to create a cluster. The basic parameters include Billing Method, Region, and Zone. The basic resources include the database engine and scaling range of resources.

Parameter

Description

Billing Method

Serverless

Region

Select a region that is close to your geographical location to reduce network latency. After a cluster is created, you cannot change the region of the cluster. For more information, see Regions and zones.

Note

Make sure that the PolarDB cluster and the Elastic Compute Service (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.

Creation Method

Create Primary Cluster

Database Engine

Select a MySQL engine version. For more information about the engine versions, see Features in PolarDB for MySQL 5.6, 5.7, and 8.0.

  • MySQL 5.7

  • MySQL 8.0.2

  • MySQL 8.0.1

Database Edition

Select a database edition. For more information about the database editions, see Differences between Enterprise Edition and Standard Edition.

  • Enterprise Edition

  • Standard Edition

Primary Zone

The zone in which the new cluster is deployed. A zone is a geographically isolated location within a region. All zones in a region provide the same level of service performance.

Note
  • 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

Configure the virtual private cloud (VPC) and vSwitch.

  • 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, such as 192.168.0.0/16, and provides up to 65,536 private IP addresses.

      • The default VPC does not count against the quota of VPCs that you can create.

    • 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, such as 192.168.0.0/20, and provides up to 4,096 private IP addresses.

      • The default vSwitch does not count against the quota of vSwitches that you can create in a VPC.

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

Note

Make sure that the PolarDB cluster is created in the same virtual private cloud (VPC) as the ECS instance to which you want to connect. Otherwise, the cluster and the Elastic Compute Service (ECS) instance cannot communicate over the internal network to achieve optimal performance.

High-availability 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 scaling range for the serverless cluster.

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

  • Maximum Read-only Nodes: 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 specified range based on the actual workloads. For more information, see Scaling.

  • To ensure high availability of serverless clusters, we recommend that you set Minimum Read-only Nodes to 1.

  • Minimum PCUs per Node: the minimum number of PCUs per node in the cluster. Valid values: 1 PCU to 31 PCUs.

  • Maximum PCUs per Node: the maximum number of PCUs per 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 the Minimum PCUs per Node parameter to 2 PCUs and the Maximum PCUs per Node parameter to 16 PCUs, the default specifications of a node in the serverless cluster are 2 PCUs (2 CPU cores and 4 GB memory). When the business load increases, the system automatically increases the number of PCUs of the primary node or read-only nodes. However, the maximum number of PCUs can only be increased to 16 PCUs (16 CPU cores and 32 GB memory) based on the settings.

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 the Detection Period for No-activity Suspension parameter on the buy page. By default, the detection period is set to 60 minutes. After the purchase, you can modify this parameter in the cluster details page. For more information, see Set automatic start for or manually start a serverless cluster.

Storage Type

  • PolarDB Enterprise Edition supports the PSL5 and PSL4 storage types:

    • PSL5: the default storage type of PolarDB clusters purchased before June 7, 2022. PSL5 provides higher performance, reliability, and availability.

    • PSL4: a new storage type for PolarDB. PSL4 uses the Smart-SSD technology developed in-house by Alibaba Cloud to compress and decompress data that is stored on SSDs. PSL4 can minimize the storage costs of data while maintaining a high disk performance.

  • PolarDB Standard Edition supports the PSL5, PSL4 and Enhanced SSD storage types.

    • PSL5: the default storage type of PolarDB clusters purchased before June 7, 2022. PSL5 provides higher performance, reliability, and availability.

    • PSL4: a new storage type for PolarDB. PSL4 uses the Smart-SSD technology developed in-house by Alibaba Cloud to compress and decompress data that is stored on SSDs. PSL4 can minimize the storage costs of data while maintaining a high disk performance.

    • Enhanced SSD: ultra-high performance disks developed by Alibaba Cloud. ESSDs use a next-generation distributed block storage architecture and support 25 Gigabit Ethernet networks and Remote Direct Memory Access (RDMA). Each ESSD has low one-way latency and can deliver up to 1 million random read/write IOPS. It is divided into the following categories:

      • PL0 ESSD: A PL0 ESSD provides the basic performance of an ESSD.

      • PL1 ESSD: A PL1 ESSD provides five times the IOPS and approximately twice the throughput compared with a PL0 ESSD.

      • PL2 ESSD: A PL2 ESSD provides approximately twice the IOPS and throughput compared with a PL1 ESSD.

      • PL3 ESSD: A PL3 ESSD provides up to ten times the IOPS and up to five times the throughput compared with a PL2 ESSD. PL3 ESSDs are suitable for business scenarios in which highly concurrent requests must be processed with high I/O performance and at low read and write latencies.

      • ESSD AutoPL: Compared with PL0, PL1, PL2, and PL3 ESSDs, an ESSD AutoPL disk decouples the IOPS and storage capacity, which allows flexible configuration and adjustment of the IOPS and storage. This reduces the overall Total Cost of Ownership (TCO).

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

        • After the storage space of an ESSD is exhausted (3 GB of storage space is reserved to avoid data loss due to insufficient storage space), the disk is locked. In this case, the disk handles only read operations.

        If you select ESSD AutoPL, you can configure the Provisioned IOPS of AutoPL Disks parameter to increase the IOPS of the ESSD AutoPL disks from the initial maximum value of 50,000. The maximum value of the parameter is 50,000. Therefore, the maximum IOPS of an ESSD AutoPL disk can reach 100,000 in theory.

Note

You cannot change the storage type of an existing cluster. If you want to change the storage type, you need to create a new cluster with the desired storage type and then migrate data to the new cluster.

Step 2: Advanced options (Optional)

Advanced options include the cluster name, resource group, and case sensitivity of table names.

Parameter

Description

Cluster Name

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

  • Custom: You must enter a cluster name. 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 this parameter is left empty, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.

Resource Group

Select a resource group from the drop-down list. For more information, see Create a resource group.

Note

A resource group is a group of relevant resources that belong to an Alibaba Cloud account. Resource groups allow you to manage resources in a centralized manner. A resource belongs to only one resource group. For more information, see Classify resources into resource groups and grant permissions on the resource groups.

Time Zone

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

Table Name

Specifies whether table names in the cluster are case-sensitive.

  • Case-insensitive (default)

  • Case-sensitive

Note
  • After the cluster is created, you cannot change the value of this parameter. Proceed with caution.

  • If your on-premises database names are case-sensitive, we recommend that you select Case-sensitive for data migration purposes.

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 configurations.

  2. The default value of Quantity is 1.

    Note

    You can create a maximum of 50 clusters at a time. This allows you to create multiple clusters in specific scenarios such as deploying multiple game servers at a time.

  3. Read the terms of service, service level agreement, and specific terms of services that you select on this page.

  4. Click Buy Now.

    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 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 select the region in which the cluster is deployed when you view the cluster. Otherwise, the cluster is not displayed.