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. PolarDB automatically scales the primary or read-only nodes of the serverless cluster within the specified range. This topic describes how to create a serverless cluster.
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 common cluster with defined specifications.
If you use other database services and want to start using serverless PolarDB clusters, you can use Data Transmission Service (DTS) to migrate the data from your existing databases to a new serverless cluster. For more information, see Overview of data migration.
You cannot enable the In-Memory Column Index (IMCI) feature for an existing serverless cluster. You can enable the serverless feature on a read-only column store node. For more information, see Enable the serverless feature on a read-only column store node.
Prerequisites
You have an Alibaba Cloud account and have logged on to the console with the account. For more information, see Register and log on to an Alibaba Cloud account.
Step 1: Complete the basic settings
In this 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 this step, click Next.
Go to the PolarDB cluster purchase page.
Set Billing Method to Serverless.
Configure the Region parameter.
Select a region that is near your geographical location to reduce latency. You cannot change the region of a cluster after the cluster is created. For more information, see Regions and Zones.
NoteMake 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.
You can deploy your PolarDB cluster and the ECS instance in the same zone or in different zones. If you create a PolarDB cluster in the same zone as the ECS instance, the network latency is reduced and the access speed is increased.
Set Creation Method to Create Primary Cluster.
In the Database Engine dropdown list, choose one of the following items: MySQL 8.0.2, MySQL 8.0.1, or MySQL 5.7.
Product Edition: Select Enterprise or Standard Edition.
Set Primary Zone.
A zone is an independent geographical location in a region. All zones in a region provide the same level of service performance.
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.
Set Enable Hot Standby Cluster.
If the hot standby storage cluster feature is enabled, the primary PolarDB cluster and the hot standby storage cluster are deployed in the same region. The two clusters each have three replicas, which adds up to six replicas. This enhances service levels as outlined in the SLA.
If you disable this feature, only the primary cluster is deployed. The cluster has three replicas, and the storage unit price is half of that when this feature is enabled. The SLA is not enhanced compared to when the feature is enabled.
NoteOnce enabled at cluster creation, this feature cannot be disabled. Similarly, if you do not enable it when creating a serverless cluster, it cannot be activated later. To enable or disable the hot standby storage cluster feature for an existing cluster, we recommend that you purchase a new cluster with the hot standby storage cluster feature set as desired, and then proceed to migrate data of the existing cluster to the new cluster over DTS. For more information, see Migrate data between PolarDB for MySQL clusters.
Set the scaling limits for resources in the serverless cluster.
Minimum Read-only Nodes: the minimum number of read-only nodes that can be added. Valid values: 0 to 15.
NoteTo ensure high availability of the serverless cluster, we recommend that you have at least one minimum read-only node.
Maximum Read-only Nodes: the maximum number of read-only nodes that can be added. The number of read-only nodes automatically scales up or down depending on your workloads. Valid values: 0 to 15.
Minimum PCUs per Node: the minimum number of PCUs per node in the cluster. PolarDB serverless clusters perform per-second billing and scaling by measuring the usage of PCUs. A PCU approximately equals 1 CPU core and 2 GB of memory. PCUs dynamically increases or decreases within the specified range based on your workloads. Valid values: 1 to 31.
Maximum PCUs per Node: the maximum number of PCUs per node in the cluster. PolarDB serverless clusters perform per-second billing and scaling by measuring the usage of PCUs. A PCU approximately equals 1 CPU core and 2 GB of memory. PCUs dynamically increases or decreases within the specified range based on your workloads. Valid values: 1 to 32.
Specifies whether to enable the no-activity suspension feature. It is disabled by default.
Set Storage Type.
PolarDB for MySQL Enterprise Edition supports the PSL5 and PSL4 storage types:
PSL5: the default storage type of PolarDB clusters purchased before June 7, 2022. It delivers 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 reduce the storage costs while maintaining high disk performance.
NoteYou cannot change the storage type of existing clusters. To change the storage type of an existing cluster, we recommend that you purchase a new cluster and configure the cluster by using the desired storage type, and then migrate data from the existing cluster to the new cluster.
For more information, see How do I select between PSL4 and PSL5?.
In addition to PSL5 and PSL4, PolarDB for MySQL Standard Edition supports PL0 to PL3 ESSDs and ESSD AutoPL disks.
ESSDs are 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. ESSDs are provided at the following performance levels (PLs):
PL0 ESSD: A PL0 ESSD delivers the basic performance of an ESSD.
PL1 ESSD: A PL1 ESSD delivers IOPS that is five times that delivered by a PL0 ESSD and throughput that is approximately twice that delivered by the PL0 ESSD.
PL2 ESSD: A PL2 ESSD delivers IOPS and throughput that are approximately twice the IOPS and throughput delivered by a PL1 ESSD.
PL3 ESSD: A PL3 ESSD delivers IOPS that is up to ten times that delivered by a PL2 ESSD and throughput that is up to five times that delivered by the PL2 ESSD. The 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 disk: Compared with an ESSD at one of the preceding PLs, an ESSD AutoPL disk decouples IOPS and storage, gives you the flexibility to configure IOPS and storage, and allows you to make some adjustments as needed. This reduces the overall Total Cost of Ownership (TCO).
For more information about ESSD performance, see ESSDs.
ImportantAfter the storage of an ESSD is exhausted, the disk is locked. In this case, the disk handles only read operations.
If you select ESSD AutoPL, you can configure the Provisioned IOPS for AutoPL parameter to increase the input/output operations per second (IOPS) of the ESSD AutoPL disk 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.
Step 2: Complete the cluster configurations
In this step, set the cluster name, network type, parameter template, and table name case sensitivity. After you complete the cluster configurations, click Next: Confirm Order.
Specify Cluster Name with an auto-generated name or a custom one.
An auto-generated name is produced by the system and can be modified after cluster creation. A custom cluster name must meet the following requirements:
Cannot start with
http://
orhttps://
.Be 2 to 256 characters in length.
Start with a letter. Can contain letters, digits, periods (.), underscores (_), and hyphens (-).
Set Resource Group.
Select a resource group from the drop-down list. For more information, see Create a resource group.
NoteA resource group allows you to centrally manage the resources of an account. A resource belongs to only one resource group. For more information, see Classify resources into resource groups and grant permissions on the resource groups.
In Network Type, configure a virtual private cloud (VPC) and vSwitch.
The network type must be VPC. Make sure that the PolarDB 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 an internal network to achieve optimal performance.
If you have an existing VPC that 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 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 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 requirements, you can create your custom VPC and vSwitch. For more information, see Create and manage a VPC.
Set Time Zone.
The time zone of the cluster. The default value is UTC+08:00.
Set the case sensitivity of Table Name.
You can specify whether table names in the cluster are case-sensitive. The default value of this parameter is Case-insensitive (Default). If table names in your on-premises database are case-sensitive, select Case-sensitive to facilitate data migration.
NoteAfter the cluster is created, you cannot change the value of this parameter. We recommend that you configure this parameter based on your business requirements.
Step 3: Confirm the order
Before the cluster is created, make sure that the selected configurations, such as the quantity, meet your requirements.
Check the selected settings.
To modify the settings in a step, click .
Set 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.
Read and select the Terms of Service.
View the fee and details in the lower part of the page. If they are correct, click Buy Now.
After you complete the payment, wait 10 to 15 minutes. Then, you can view the newly created cluster on your PolarDB console.
NoteIf 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 it 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.