All Products
Search
Document Center

PolarDB:Serverless

Last Updated:May 27, 2026

The serverless feature provides dynamic scaling capabilities to PolarDB clusters. Each node in a cluster can be scaled up within seconds to handle sudden increases in workloads without affecting business operations. When workloads decrease, nodes can be scaled down to save costs.

With Serverless feature, you don't have to worry about the resource configuration of your database cluster when you create and use databases. The following section shows the changes in resource usage and specifications of a common cluster and a serverless cluster when your business fluctuates:

ordinaryclusterandServerlessclusterforcomparediagram

  • Common cluster:

    Resources are wasted during off-peak hours. Resources are insufficient and business cannot be processed during peak hours.

  • Serverless clusters

    • Resources are dynamically scaled based on workloads. This enhances resource usage and reduces resource waste.

    • Resources are scaled within one second without interrupting business. Sufficient resources are provided during peak hours. This ensures business performance and system stability.

    • The pay-as-you-go billing method is supported. This reduces costs and ensures that resources are dynamically allocated based on workloads.

    • No manual configuration changes are required. This improves O&M efficiency.

Features

The serverless feature provides real-time elasticity for CPU, memory, storage, and network resources. It offers vertical resource isolation for network resources and storage space, supports pay-as-you-go billing with independent scaling of compute and storage, enabling rapid response to workload changes while reducing costs.

Introduction

Description

Display format

  • Serverless clusters: clusters whose billing method is Serverless.

  • Serverless feature for clusters with defined specifications: clusters whose billing method is subscription or pay-as-you-go and later have the serverless feature manually enabled.

    Defined specifications refer to the fixed compute node specifications of a cluster whose billing method is subscription or pay-as-you-go.

Scaling method

  • Scale-up/down: The specifications (CPU and memory) of compute nodes change.

  • Scale-in/out: The number of read-only nodes changes.

PCU (PolarDB Capacity Unit)

The serverless feature uses PCU as the billing and elasticity unit, measured per second. 1 PCU ≈ 1 CPU core + 2 GB memory. Each node's PCUs adjust dynamically within the configured range. Minimum increment: 0.5 PCU.

Format

Serverless cluster

Serverless feature for clusters with defined specifications

image image
  • Database proxy

    • The database proxy uses a serverless architecture. Proxy resources scale independently of compute nodes and require no manual configuration.

    • Default scaling increment: 0.5 PCU. The increment increases dynamically as PCU usage grows.

  • Compute nodes

    • The primary node (RW) and read-only nodes (RO) use a serverless architecture, scaling with workloads on shared storage in a single zone.

    • Scaling adjusts the PCU count of individual nodes up or down.

    • Default scaling increment: 0.5 PCU. The increment increases dynamically as PCU usage grows.

    • You can configure the per-node PCU scaling range. The system monitors node PCUs every second.

  • Storage space

    Storage uses pay-as-you-go billing. You do not need to specify the storage capacity at the time of purchase. Capacity scales automatically with data growth — you pay only for what you use. View Database Storage Usage on the Basic Information page. For more information, see View the database storage usage.

Note
  • The maximum connections for a serverless cluster is 100,000, and the maximum IOPS is 84,000.

  • Serverless clusters support No-activity Suspension (disabled by default). When enabled, the cluster suspends automatically if no connection is received within the Detection Period For No-activity Suspension. During suspension, only storage fees (pay-as-you-go) apply. The cluster resumes automatically upon any new connection.

  • Database proxy

    • The database proxy uses a serverless architecture. Proxy resources scale independently of compute nodes and require no manual configuration.

    • Default scaling increment: 0.5 PCU. The increment increases dynamically as PCU usage grows.

  • Compute nodes

    • The primary node (RW) and read-only nodes (RO) use a serverless architecture, scaling with workloads on shared storage in a single zone.

    • Scaling adjusts the PCU count of individual nodes up or down.

    • Default scaling increment: 0.5 PCU. The increment increases dynamically as PCU usage grows.

    • You can configure the per-node PCU scaling range. The system monitors node PCUs every second.

  • Storage space

    Storage uses pay-as-you-go billing. You do not need to specify the storage capacity at the time of purchase. Capacity scales automatically with data growth — you pay only for what you use. View Database Storage Usage on the Basic Information page. For more information, see View the database storage usage.

Note

Scaling

Trigger conditions for scale-up and scale-out

  • Scale-up (node upgrade)

    PolarDB monitors CPU utilization, memory usage, and other kernel-level metrics of primary and read-only nodes. During a monitoring cycle, a scale-up is typically triggered for a node when any of the following conditions occur:

    • The CPU utilization is higher than the preset threshold (default 80%).

    • The memory usage is higher than 90%.

    • The specifications of a read-only node are less than half of the specifications of the primary node.

      For example, if a read-only node has specifications of 4 PCU and the primary node has specifications of 10 PCU, the read-only node is scaled up to at least 5 PCU.

  • Scale-out (add a node)

    A scale-out triggers when a read-only node reaches maximum specifications and the scale-up threshold persists (for example, CPU utilization exceeds the custom threshold).

Trigger conditions for scale-down and scale-in

  • Scale-down (node downgrade)

    A scale-down triggers when CPU utilization falls below the custom threshold (default 50%) and memory usage is below 80%.

  • Scale-in (remove a node)

    A scale-in triggers for a read-only node when its CPU utilization stays below 15% and all other read-only nodes stay below 60% for 15–30 minutes.

    Note
    • To prevent jitter, only one read-only node scales in at a time, with a 15–30 minute cooldown between consecutive scale-in events.

    • To immediately scale in all read-only nodes, set both Maximum Number of Read-only Nodes and Minimum Number of Read-only Nodes to 0 in Serverless Configuration.

Note
  • The scaling range depends on the maximum and minimum number of read-only nodes and maximum and minimum PCUs per node you configure. For more information, see Configure scaling policies for a serverless cluster or Set a scaling policy for serverless resources.

  • Scaling trigger metrics depend on your parameter and serverless configurations. You can customize the CPU utilization threshold; other metric thresholds are fixed.

  • During traffic spikes, nodes scale up incrementally (minimum 0.5 PCU) rather than all at once. The increment auto-adjusts based on current PCU count to adapt quickly.

  • Configure alert rules in Performance Monitoring to get notified on scale-down events. For more information about how to configure alert rules, see Create an alert rule.

Benefits

The serverless feature can dynamically scale cluster resources in seconds based on workloads. The serverless feature provides the following benefits:

  • High availability

    The multi-node architecture ensures the high availability of serverless clusters. Serverless clusters offer the same service level agreement (SLA) as common clusters to ensure stability.

  • High scalability

    • Wide scaling range

      A single cluster can be scaled between 0 and 1,000 CPU cores without interrupting business.

    • Scalability in seconds

      Workload detection is accomplished in five seconds and cluster resources are scaled up within a second when your workloads increase. If your workloads decrease, cluster resources are automatically scaled down in a tiered manner.

    • No business interruption

      The scaling process has no impact on business.

  • Strong data consistency

    Global consistency (high-performance mode) is provided. 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 in the pay-as-you-go billing method. This reduces costs by up to 80%.

  • Zero O&M

    The PolarDB serverless team is responsible for all operations and maintenance work, such as system upgrades, system deployment, scaling, and alert processing. These operations are performed in the background and do not affect the services that are running in the system. This ensures continuous service delivery and allows you to focus on developing your business.

Scenarios

Serverless clusters

  • Scenarios in which workloads fluctuate dramatically

  • Scenarios that require infrequent access to databases, such as databases in development and testing environments

  • Scenarios in which intermittent scheduled tasks are involved, such as teaching and student experiments

  • Scenarios that handle inconsistent and unpredictable workloads, such as IoT and edge computing

  • Scenarios that need to reduce O&M costs and improve O&M efficiency

Serverless clusters with defined specifications

  • Scenarios in which workloads fluctuate dramatically

  • Scenarios that handle inconsistent and unpredictable workloads, such as IoT and edge computing

  • Scenarios that need to reduce O&M costs and improve O&M efficiency

  • Scenarios that need to satisfy fluctuation requirements based on existing PolarDB clusters.

Prerequisites

Serverless clusters

  • Clusters whose database engine is MySQL 5.6 are not supported.

  • The serverless feature is unavailable for clusters whose CPU architecture is YiTian ARM.

Serverless feature for clusters with defined specifications

To enable the serverless feature on a cluster with defined specifications, ensure the cluster meets these version requirements:

  • Engine version:

    • MySQL 5.6: Not supported.

    • MySQL 5.7: The minor engine version must be 5.7.1.0.29 or later.

    • MySQL 8.0.1: The minor engine version must be 8.0.1.1.30.1 or later.

    • MySQL 8.0.2: The minor engine version must be 8.0.2.2.19 or later.

  • Database proxy (Proxy) version: Must be 2.4.30 or later.

  • CPU Architecture: Must be X86. YiTian ARM is not supported.

Limits

Serverless clusters

Serverless feature for clusters with defined specifications

  • Single-node clusters without a database proxy do not support serverless (prerequisites not met). To enable it, add a read-only node. Newly purchased single-node clusters that meet version requirements support serverless by default.

  • Enterprise Edition: Manual scale up or down storage space is not supported.

  • The global database network (GDN) feature is supported with the following limitations:

    • No-activity Suspension cannot be set for any cluster in the GDN.

    • When the database engine version meets the following conditions, all clusters in the GDN must have at least one read-only node:

      • MySQL 8.0.1 with a minor engine version earlier than 8.0.1.1.42.

      • MySQL 8.0.2 with a minor engine version earlier than 8.0.2.2.23.

  • The serverless feature and Elastic scaling with auto scaling are mutually exclusive on clusters with defined specifications. You cannot enable the serverless feature and Elastic scaling with auto scaling simultaneously.

Note

For more information about version requirements and limits, see Enable serverless for defined-specification clusters.

Pricing

  • Serverless clusters

    • Fees include compute nodes, storage, backup storage (beyond free quota), and SQL Explorer (optional), as detailed in Serverless billing.

    • You can view your bills on the Expenses and Costs page. On the Bill Details page, select PolarDB-Serverless from the Product Name drop-down list. For more information, see Bill details.

  • Serverless feature for clusters with defined specifications

    Fees combine defined-specification resource costs and serverless resource costs. For more information about the costs for resources with defined specifications, see Billable items. For more information about the costs for serverless resources, see Billing.