When traffic spikes, manually adjusting PolarDB cluster capacity is slow and error-prone. The auto scaling feature of Database Autonomy Service (DAS) monitors CPU utilization and automatically adds read-only nodes or upgrades cluster specifications when load increases, then scales back when load drops — without manual intervention.
Prerequisites
Before you begin, make sure that:
-
Your cluster meets the following requirements:
-
Product edition: Enterprise Edition
-
Edition: Cluster Edition
-
-
No cluster specification change tasks are in progress
-
A service-linked role for DAS has been created. For more information, see AliyunServiceRoleForDAS role
-
Your application supports automatic reconnection, because scaling briefly disconnects connections for approximately 30 seconds
Billing
For billing details, see Configuration change fees.
How it works
Auto scaling monitors average CPU utilization across the cluster during an observation window. When utilization reaches the configured threshold, PolarDB selects a scaling method based on real-time read/write traffic:
-
Read traffic surge — read-only nodes are added
-
Write traffic surge or primary node overload — cluster specifications are scaled up
Scale-in runs after load drops below 30% CPU for more than 99% of the scale-in observation window (observation window plus 10 minutes), outside a quiescent period. The cluster scales back tier-by-tier to its original specifications.
Auto scaling adjusts the entire cluster's specifications at once. It does not support scaling the primary node and read-only nodes independently. After a scale-in or scale-down, all read-only nodes use the same specification as the primary node.
For clusters with three or more nodes that use different specifications for the primary and read-only nodes, enabling Automatic Scale-up/out triggers one of the following scale-out methods based on real-time traffic when average CPU utilization reaches the threshold:
-
Add read-only nodes at the same specification as the primary node
-
Add read-only nodes at the same specification as an existing read-only node (used when read-only node CPU utilization reaches the threshold)
-
Upgrade read-only nodes to the same specification as the primary node
When scale-in runs, it uses one of the following methods:
-
Delete the added read-only nodes (specifications of remaining read-only nodes are unchanged)
-
Downgrade all read-only nodes to the same specification as the primary node
Usage notes
-
Data stored in the cluster is not affected during scale-out or scale-in.
-
During scaling, applications are disconnected for approximately 30 seconds. Run scaling during off-peak hours.
-
Scaling has minor impact on the primary node but temporarily degrades read-only node performance.
Enable auto scaling
-
Log on to the PolarDB console. In the left-side navigation pane, click Clusters. Select a region, then click the cluster ID to go to the Basic Information page.
-
In the left-side navigation pane, choose Diagnostics and Optimization > Quick Diagnostics.
-
Click the Autonomy Center tab.
-
In the upper-right corner, click Autonomy Service Settings.

-
On the Autonomous Function Settings tab of the Autonomous Function Management panel, enable the autonomy service.

-
On the Optimization and Throttling tab, select Automatic Scale-up/out and Automatic Scale-down/in.
-
Configure the parameters and click OK.
Parameter Description CPU Utilization ≥ The CPU utilization threshold that triggers scale-up. When average CPU utilization reaches or exceeds this value within the observation window, auto scaling is triggered. For example, if the threshold is set to 70% and the observation window is 5 minutes, auto scaling is triggered when average CPU utilization exceeds 70% within that window. Maximum Specifications The maximum specification to which the cluster can scale. The cluster scales up in increments — for example, from 4 cores to 8 cores, then to 16 cores — until it reaches this limit. Max number of Read-Only Nodes The maximum number of read-only nodes that can be added automatically. The system adds one or two nodes at a time until this limit is reached. Automatically added nodes are associated with the default endpoint. If you use a custom endpoint, configure the Automatically Associate New Nodes parameter separately. For more information, see Configure PolarProxy. Observation Window The time window during which CPU utilization is measured. If average CPU utilization reaches the threshold within this window, scaling is triggered after the window ends. For example, with a 5-minute observation window and a 10-minute scaling activity, the total wait before results are visible is 15 minutes. The scale-in observation window equals the observation window plus 10 minutes — for example, a 30-minute observation window gives a 40-minute scale-in window. Quiescent Period The minimum interval between two consecutive scaling activities. PolarDB continues to monitor the cluster during a quiescent period but does not trigger new scaling. If the quiescent period and observation window end at the same time and CPU utilization still meets the threshold, scaling is triggered immediately.
What's next
To manage endpoints for automatically added nodes, see Configure PolarProxy.