PolarDB for MySQL serverless uses shared storage and adopts the architecture that consists of one primary node and multiple read-only nodes to implement dynamic elastic scaling based on system workloads. PolarDB for MySQL serverless implements scaling (scale-in/out and scale-up/down) of read-only nodes in a cluster within seconds, to make full use of the computing resources of the cluster and reduce business costs. This topic describes how a serverless cluster works and its benefits and application scenarios.
Background information
Databases are a very important part of the IT system of modern enterprises. When you create a cluster, you often adopt a conservative approach to configure resources such as CPU, memory, storage, and connections, to ensure that the cluster can run smoothly even during peak hours. In this case, your resources are idle during off-peak hours and may be insufficient during peak hours. Serverless clusters can solve this problem. Serverless clusters provide resource scaling depending on your workloads and free you from complex resource evaluation and O&M.
The following figure shows the resource usage and specifications of common clusters and serverless clusters in scenarios with high business fluctuations:
Common cluster: A lot of resources are wasted during off-peak hours. During peak hours, resources are insufficient and business cannot be processed.
Serverless cluster:
Dynamically scales resources according to your workloads, enhancing resource utilization and reducing waste.
Completes resource scaling in clusters within one second, with the services remaining unaffected and unaware of it. Provides sufficient resources during peak hours, which ensures the performance and service stability.
Supports the pay-as-you-go billing method that not only reduces costs but also ensures resources are dynamically allocated to align with workloads.
Requires no manual configuration changes, greatly improving O&M efficiency.
Supports the automatic start and stop feature. The clusters automatically suspends and releases computing resources when there are no incoming requests, and seamlessly restarts upon receiving new requests.
NoteYou can enable or disable the automatic cluster suspension feature for a serverless cluster with defined specifications.
Optimizes high-throughput write operations and high-performance batch processing operations and supports auto scaling. This is suitable for scenarios in which large amounts of data and large traffic fluctuations are involved.
How it works
PolarDB for MySQL serverless supports real-time scaling of CPU, memory, storage, and network resources. PolarDB for MySQL uses a new architecture in which computing and storage are separated. Serverless clusters also allow you to isolate network resources, namespaces, and storage resources. Serverless clusters support the pay-as-you-go billing method for computing resources and provide the following benefits: low resource usage, ease of use, flexibility, and low price. Serverless clusters can help you quickly and independently scale computing resources to adapt to fluctuating workloads, reduce costs, and improve efficiency.
Terms
Serverless cluster: refers to a serverless cluster that you create. For information on how to create a serverless cluster, see Create a serverless cluster.
Serverless cluster with defined specifications: refers to a common cluster that has the serverless feature enabled. For information on how to enable the serverless feature, see Enable the serverless feature.
Scale-up/down: scales the specifications (CPU and memory specifications) of nodes in a cluster.
Scale-in/out: scales the number of read-only nodes in a cluster.
Serverless clusters
Serverless clusters with defined specifications
Trigger conditions for elastic scaling of serverless resources
Trigger conditions for scale-up and scale-out
Scale-up trigger conditions
PolarDB monitors the CPU utilization, memory usage, and other kernel metrics of the primary and read-only nodes. During a monitoring cycle, the scale-up of serverless resources is triggered when one of the following conditions is met:
When the CPU utilization of a single node is higher than 80%, scaling up the CPU specifications of the node is triggered.
When the memory usage of a single node is higher than 90%, scaling up the memory specifications of the node is triggered.
If the specifications of a read-only node are less than half of the specifications of the primary node, scaling up the specifications of the read-only node is triggered. For example, if the specifications of a read-only node are 4 PCUs and the specifications of the primary node are 10 PCUs, the specifications of the read-only node are scaled to no less than 5 PCUs.
Scale-out trigger conditions
If a read-only node has been scaled up to the maximum specifications and the business workload is still higher than the threshold for a scale-up (CPU utilization is higher than 80% or memory usage is higher than 90%), a scale-out of read-only nodes is triggered.
Scale-down trigger conditions
When the CPU utilization of a single node is lower than 50% and the memory usage is lower than 80%, the scale-down of the node is triggered.
The preceding conditions apply to both serverless clusters and serverless clusters with defined specifications.
The preceding thresholds use default values. The thresholds vary based on cluster kernel parameters and serverless configuration policies.
Fees
Fees of a serverless cluster
The fees include compute node fees, storage capacity fees, backup storage fees (only for the part exceeding the free quota), and SQL Explorer fees (optional) For more information, see Billing.
Fees of a serverless cluster with defined specifications
The fees include the fees of the common cluster and the fees of the serverless feature. For more information about the fees of a common cluster, see Billable items. For more information about the fees of the serverless feature, see Billing.
Core benefits
PolarDB for MySQL can dynamically scale cluster resources in seconds depending on business loads. Its core benefits include:
High availability
The multi-node architecture ensures the high availability of serverless clusters. Serverless clusters offers the same service level agreement (SLA) as common clusters to ensures stability.
High scalability
Wide range
PolarDB for MySQL serverless supports automatic scale-in/out and provides the widest scaling range in the industry. A single cluster can be scaled between 0 to 1000 cores.
Scalability in seconds
Workload detection is accomplished in five seconds and cluster resources are scaled out within a second when your workloads increase. If your workloads decrease, cluster resources are automatically released in a tiered manner.
No business interruption
The scaling process has no impact on business.
Strong data consistency
Global consistency is provided in high-performance mode. Clusters support strong data consistency. Data can be read immediately after it is written to read-only nodes, while the performance is almost the same as in weak consistency mode.
Cost-effectiveness
Serverless clusters are billed in PCUs to save costs. Costs can be reduced by up to 80%.
Zero O&M
The PolarDB for MySQL serverless team takes responsibility for all operations and maintenance work such as system upgrades, system deployment, scaling, and alert processing. These operations are carried out in the background, and do not affect the services running on the system. This ensures continuous service delivery and allows you to focus on developing your business.