All Products
Search
Document Center

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

Last Updated:Feb 28, 2026

PolarDB for PostgreSQL clusters with defined specifications use fixed compute resources, which means you must manually scale when workload patterns change. The serverless feature adds elastic auto-scaling on top of your existing cluster, automatically adjusting compute resources based on workload so the cluster scales up during traffic spikes and scales down during idle periods.

Prerequisites

Before you begin, make sure your cluster meets the following requirements:

  • Enterprise Edition, Dedicated series

  • PostgreSQL 14 with minor engine version 14.13.27.0 or later

  • Subscription or pay-as-you-go billing method

How it works

After you enable the serverless feature, your cluster gains elastic compute resources on top of its defined specifications:

Component

Behavior

PolarProxy

Adds serverless resources alongside existing proxy resources. Scales in units of 0.5 PCU (PolarDB Capacity Unit). The number of PCUs added or removed in a scaling activity is positively correlated with the number of PCUs used.

Compute nodes

Both primary (read/write) and read-only nodes gain serverless resources on top of their defined specifications. The defined-specification resources remain fixed, while the serverless resources scale based on workload. The number of PCUs increases or decreases based on the scaling of the primary node or read-only nodes. Scales in units of 0.5 PCU. The system monitors PCU consumption every second.

Storage

Uses the same storage as the underlying cluster with defined specifications. For pricing details, see Storage.

After you enable the serverless feature, the maximum number of connections and the maximum IOPS are proportional to the value of Maximum Resources for Single Node.

Billing

The total cost consists of two parts:

Component

Description

Cluster with defined specifications

The base cost of your existing cluster. See Billing of clusters with defined specifications.

Serverless feature

The cost of elastic resources consumed. See Serverless billing.

Enable the serverless feature

Important

Enabling the serverless feature causes a transient connection that lasts about 15 to 30 seconds. If the current host has insufficient resources, the cluster may be migrated to an idle host. Enable this feature during off-peak hours.

  1. Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select the region where the cluster is deployed, and then click the cluster ID.

  2. On the Basic Information page, in the Database Nodes section, click Enable Serverless. Enable Serverless button

  3. In the Enable Serverless dialog box, configure the following parameters and click OK.

Vertical scaling parameters

These parameters control how much additional compute each existing node can use.

Parameter

Description

Valid values

Maximum Resources for Single Node

The upper limit of serverless resources added to each existing node.

0 to 16 PCU

Minimum Resources for Single Node

The lower limit of serverless resources added to each existing node.

0 to 16 PCU. Must be less than or equal to the maximum value.

These values do not include the base resources of the cluster with defined specifications. After configuration, the effective resource range for each existing node is (defined specifications + minimum PCU) to (defined specifications + maximum PCU).
The vertical scaling range for auto-scaled serverless read-only nodes is 1 to 32 PCU by default. You do not need to configure this.

Example: If you set Minimum Resources for Single Node to 2 PCU and Maximum Resources for Single Node to 8 PCU, each existing node starts at its defined specifications plus 2 PCU (approximately 2 cores and 4 GB of memory). Under high workload, each node can scale up to its defined specifications plus 8 PCU (approximately 8 cores and 16 GB of memory).

Horizontal scaling parameters

These parameters control how many serverless read-only nodes the system can add or maintain.

Parameter

Description

Valid values

Maximum Number of Read-only Nodes

The maximum number of serverless read-only nodes that the system can add.

0 to 15

Minimum Number of Read-only Nodes

The minimum number of serverless read-only nodes to maintain.

0 to 15. Must be less than or equal to the maximum value.

These values do not include the original read-only nodes in your cluster. A cluster supports a maximum of 15 read-only nodes in total (original + auto-scaled).

Example: If you set Minimum Number of Read-only Nodes to 1 and Maximum Number of Read-only Nodes to 2, the cluster always maintains one additional serverless read-only node. Under high workload, the system adds up to two serverless read-only nodes.

Choose appropriate PCU values

When choosing the minimum and maximum PCU values, consider these factors:

Factor

Recommendation

Scaling increment

The number of PCUs added or removed in a scaling activity is positively correlated with the number of PCUs used. If your workload has sudden spikes, set a higher minimum to keep the cluster ready with more resources.

Buffer cache

If your application relies on keeping frequently accessed data in memory, set the minimum high enough to hold the working dataset. Each PCU corresponds to approximately 1 core and 2 GB of memory.

Budget

The minimum PCU value determines the baseline cost when the cluster is idle. Set the maximum based on the highest workload you want the cluster to handle without manual intervention.

Verify the configuration

After you click OK, verify that the serverless feature is active:

  1. On the Basic Information page, check that the Database Nodes section shows Serverless: Enabled. To view the scaling parameters, click Serverless Configuration.

  2. Monitor cluster metrics in the PolarDB console to confirm that PCU values change in response to workload fluctuations.

Next steps

API reference

API

Description

EnableDBClusterServerless

Enables the serverless feature for a cluster with defined specifications (steady-state serverless).

DescribeDBClusterServerlessConf

Queries the serverless configuration of a cluster.