All Products
Search
Document Center

PolarDB:Overview

Last Updated:Apr 22, 2024

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: 普通集群和Serverless集群对比图

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

      Note

      You 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

Architecture of a serverless cluster 计算架构

  • Serverless PolarProxy

    Serverless PolarProxy uses the serverless architecture and is scaled independent of compute nodes. PolarProxy specifications are not user-defined. Serverless proxy resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory.

  • Scale compute nodes of a serverless cluster

    Both the primary node and read-only nodes adopt the serverless architecture. They can scale with workloads and share distributed storage within a single zone.

    Serverless compute resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory. Nodes are scaled in units of 0.5 PCUs. If more current PCUs are used by a node, more PCUs are added or removed in the scaling.

    You can specify the range (1 PCU to 32 PCUs) for scaling a single-node. Scaling a primary or read-only node means the number of PCUs for the node increases or decreases. The system monitors the PCU of the compute node every second.

    Note

    The maximum number of connections for a serverless cluster is 10500.

  • Serverless cluster storage

    A serverless architecture is used for storage. Therefore, you do not need to specify the storage capacity when you purchase clusters. The storage capacity is automatically increased when the amount of data increases. You are charged for only the storage that you use. On the Basic Information page of a cluster, you can view Database Storage Usage. For more information, see View the database storage usage.

Serverless clusters with defined specifications

Architecture of a serverless cluster with defined specifications固定规格的serverless功能

  • PolarProxy of a serverless cluster with defined specifications

    The PolarProxy is composed of the proxy resources of a common cluster and the serverless proxy resources. The proxy resources of a common cluster are specified when the common cluster is created. Serverless proxy resources are scaled independent of compute nodes and not user-defined.

    Serverless proxy resources are measured in PCUs. A PCU is approximately equal to 1 core and 2 GB of memory. Nodes are scaled in units of 0.5 PCUs. If more current PCUs are used by a node, more PCUs are added or removed in the scaling.

  • Scale compute nodes of a serverless cluster with defined specifications

    For a serverless cluster with defined specifications, the resources of the primary node and read-only nodes include defined-specification resources and serverless resources. The defined-specification resources cannot be scaled, while the serverless resources can be scaled depending on workloads.

    Serverless compute nodes are measured in PCUs. One PCU is equivalent to one core and 2 GB of resources. 0.5 PCUs are equivalent to 0.5 cores and 1 GB of resources. Nodes are scaled in units of 0.5 PCUs. If more current PCUs are used by a node, more PCUs are added or removed in the scaling.

    You can specify the range (1 PCU to 32 PCUs) for scaling a single-node.

    Scaling a primary or read-only node means the number of PCUs for the node increases or decreases. The system monitors the PCU of the compute node every second.

Note

The maximum number of connections for a serverless cluster with defined specifications is consistent with that for a common cluster with defined specifications. For more information, see Specifications of compute nodes in different editions.

  • Storage of a serverless cluster with defined specifications

    The storage capacity of the common cluster with defined specifications is used. For more information, see Storage overview.

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.

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

Scenarios

Scenarios of serverless clusters

  • Infrequent access to databases, such as development and test environments

  • Software as a service (SaaS) scenarios, such as website building of small and medium-sized enterprises

  • Individual developers

  • Educational scenarios, such as teaching and student experiments

  • Uncertain load scenarios, such as IoT and edge computing

  • Scenarios in which services are changing or unpredictable

Scenarios of serverless clusters with defined specifications

  • Enterprise-level databases for medium- and large-sized users

  • Satisfying fluctuation requirements based on existing PolarDB for MySQL clusters.

Limits

Limits on serverless clusters

Limits on serverless clusters with defined specifications

  • Cluster versions:

    • The revision version of a PolarDB for MySQL 5.7 cluster must be 5.7.1.0.29 or later.

    • The revision version of a PolarDB for MySQL 8.0.1 cluster must be 8.0.1.1.30.1 or later.

    • The revision version of a PolarDB for MySQL 8.0.2 cluster must be 8.0.2.2.19 or later.

    • The serverless feature does not apply to PolarDB for MySQL 5.6 clusters.

  • Serverless clusters with defined specifications do not support the features: Multi-master Cluster (Database/Table) and X-Engine.

  • Serverless clusters with defined specifications support the features: Add or remove read-only nodes, Manually upgrade or downgrade a PolarDB cluster, and Perform a temporary cluster upgrade. However, the serverless feature cannot be used with Automatically scale local resources or Auto scaling. After you enable the serverless feature for a cluster with defined specifications, you cannot enable the Automatically scale local resources or Auto scaling feature. Similarly, after you enable the Automatically scale local resources and Auto scaling features for a cluster with defined specifications, you cannot enable the serverless feature for the cluster.

  • The serverless feature cannot be enabled for a Cluster Edition cluster with only one primary node. If you want to enable the serverless feature, you need to add read-only nodes. For more information, see the "Add a read-only node" section of the Add or remove read-only nodes topic.

  • The serverless feature supports Global Database Network (GDN). However, all clusters in the GDN cannot be automatically started or stopped. Each cluster must have at least one read-only node.