All Products
Search
Document Center

PolarDB:Manage the serverless feature for a cluster with defined specifications

Last Updated:Mar 28, 2026

After enabling the serverless feature on a cluster with defined specifications, configure a scaling policy to control how PolarDB adjusts resources in response to workloads. Optionally, set up lifecycle policies to pre-scale the cluster before predictable peak periods and scale it back afterward.

Limitations

ConstraintDetails
PCU scaling — dedicated specsNot supported for compute nodes with more than 32 CPU cores
PCU scaling — general-purpose specsNot supported for compute nodes with more than 16 CPU cores
Lifecycle policyCluster Edition only
Max connections and max IOPSProportional to the Maximum Resources for Single Node value
Read-only column store nodesTo enable serverless scaling on column store nodes, add them to the cluster first

How it works

PolarDB monitors CPU utilization, memory usage, and other kernel metrics on each node within a monitoring cycle.

Scale-up triggers

Scale-up is triggered on a node when any of the following conditions is met:

  • CPU utilization exceeds the scale-up threshold (default: 80%, configurable)

  • Memory usage exceeds 90%

  • A read-only node's specifications fall below half of the primary node's specifications — for example, if the read-only node is at 4 PolarDB Capacity Units (PCUs) and the primary node is at 10 PCUs, the read-only node scales up to at least 5 PCUs

When workloads increase rapidly, nodes scale step by step toward the target specifications rather than jumping directly. Each subsequent step size grows based on the current PCU count per node, with a minimum step of 0.5 PCUs.

Scale-out triggers

When a read-only node reaches its maximum specifications and CPU utilization still exceeds the scale-out threshold (default: 80%, configurable), PolarDB adds a new read-only node.

Scale-down triggers

When CPU utilization drops below the scale-down threshold (default: 50%, configurable) and memory usage drops below 80%, the node scales down.

CPU scale-up and scale-down thresholds are configurable. Thresholds for memory and other metrics cannot be changed. To receive notifications when scale-down occurs, create an alert rule in Performance Monitoring on the PolarDB console. See Create an alert rule.

Configure serverless parameters

Prerequisites

Before you begin, ensure that you have:

  • An existing PolarDB cluster with the serverless feature enabled

  • Access to the PolarDB console

Steps

  1. Log on to the PolarDB console and click Clusters in the left-side navigation pane.

  2. Select a region and click the cluster ID to go to the Basic Information page.

  3. In the Database Nodes section, click Serverless Configuration.

    image

  4. In the Configure Serverless-related Parameters dialog box, click Edit to the right of Current Parameters and set the following parameters.

    image

Current parameters

ParameterDescriptionValid values
Minimum Read-only NodesMinimum number of read-only nodes maintained at all times0–15
Maximum Read-only NodesMaximum number of read-only nodes the cluster can scale out to0–15
Minimum Resources for Single NodeMinimum PCUs per node0–16
Maximum Resources for Single NodeMaximum PCUs per node0–16
Read-only Column Store NodesMaximum number of read-only column store nodes (IMCI) that can be added0–15
Read-only Column Store Nodes appears only when read-only column store nodes are already added to the cluster. For more information, see IMCIs.

Choosing minimum and maximum PCU values

One PCU is approximately 1 CPU core and 2 GB of memory. Setting the minimum and maximum values correctly affects both performance and cost:

  • Minimum Resources for Single Node: The cluster always maintains at least this many PCUs per node on top of the node's defined specifications. A higher minimum means faster scale-up when workloads spike, because the scaling rate increases with the current capacity level — but it also means higher baseline resource usage. Set this to a value that covers your expected idle-state load.

  • Maximum Resources for Single Node: This caps the additional PCUs a node can acquire. It also determines the maximum connections and IOPS for the cluster. Set this high enough to handle your peak workload without hitting connection or IOPS limits.

Example: With Minimum Resources for Single Node set to 2 PCUs and Maximum Resources for Single Node set to 8 PCUs, each node starts with the defined specifications plus 2 PCUs (approximately 2 cores and 4 GB memory). Under peak load, the node can expand to the defined specifications plus 8 PCUs (approximately 8 cores and 16 GB memory).

Read-only nodes automatically scale in and out within the range set by Minimum Read-only Nodes and Maximum Read-only Nodes. See Scaling.

Advanced settings

Adjust these parameters based on the resource pressure of the cluster.

ParameterDescriptionValid values
Scan IntervalControls how quickly the cluster responds to workload changes. Sensitive mode reduces the observation window and execution period so the cluster reacts faster — suitable for businesses with instantaneous load spikes such as sudden CPU surges. Standard mode is appropriate for most workloads.Standard, Sensitive
Maximum CPU Resources for Elastic UpgradeCPU utilization threshold that triggers scale-up40%–100%
Minimum CPU Resources for Elastic UpgradeCPU utilization threshold that triggers scale-down10%–70%
The Maximum CPU Resources for Elastic Upgrade value must be equal to or higher than the Minimum CPU Resources for Elastic Upgrade value, and the difference between them must be at least 30 PCUs.

Create a lifecycle policy

A lifecycle policy scales the cluster at scheduled times — monthly, weekly, or daily — within a specified date range. Use lifecycle policies to scale up or out before predictable peak periods such as promotions, and scale back during off-peak hours to release idle resources.

Warning

Only Cluster Edition supports lifecycle policies. Proceed with caution:

  • Deleting a recurring policy does not cancel the task currently executing. Only pending tasks are deleted.

  • Disabling the serverless feature deletes all recurring policies and scheduled tasks.

  1. In the Configure Serverless-related Parameters dialog box, click + Add Lifecycle Policy.

  2. Set the following parameters:

    After a lifecycle policy runs, the cluster's serverless parameters are updated but are not automatically reverted when the policy period ends. To revert parameters at a specific time, create a second lifecycle policy that restores the original values.
    ParameterDescriptionValid values
    Maximum Resources for Single NodeMaximum PCUs per node during the policy period0–16
    Minimum Resources for Single NodeMinimum PCUs per node during the policy period. Must be ≤ Maximum Resources for Single Node.0–16
    Maximum Read-only NodesMaximum read-only nodes during the policy period0–15
    Minimum Read-only NodesMinimum read-only nodes during the policy period. Must be ≤ Maximum Read-only Nodes.0–15
    Read-only Column Store NodesMaximum read-only column store nodes during the policy period. Appears only when column store nodes are already added. See IMCIs.0–15
    Start/End TimeThe validity period during which the recurring policy is activeDate range
    Policy SchedulingHow often the policy runs — monthly, weekly, or daily. For Month, use Positive (count forward from day 1) or Last (count backward from the last day). Separate multiple days with commas, for example 1,3,5.Month / Weekly / Daily
  3. (Optional) After creating the policy, view its scheduled tasks:

    • On the cluster details page, check the execution plans. image

    • In the PolarDB console, go to Task Management > Scheduled Tasks. image

Example

To scale up by 5 PCUs at 9:30 and scale down 1 PCU at 22:00 every business day (Monday–Friday) from August 1 to September 30, create two lifecycle policies as shown below.

imageimage

Disable the serverless feature

Important

After the serverless feature is disabled, all scaled resources are reclaimed. If resources are in use during reclamation, exceptions may occur. Disable the serverless feature during off-peak hours.

  1. Log on to the PolarDB console and click Clusters in the left-side navigation pane.

  2. Select a region and click the cluster ID to go to the Basic Information page.

  3. In the Database Nodes section, click Disable Serverless.

    image

API reference

APIDescription
DescribeDBClusterServerlessConfQuery the serverless configuration of a cluster
ModifyDBClusterServerlessConfModify the serverless configuration of a cluster
DisableDBClusterServerlessDisable the serverless feature

What's next

Enable the serverless feature for a cluster with defined specifications