When CPU usage on a dedicated cluster instance spikes unexpectedly, static scaling requires manual intervention and cannot respond in real time. CPU auto scaling lets the cluster automatically increase instance CPU resources when utilization reaches a threshold, reducing O&M overhead for unpredictable workloads.
Auto scaling vs. static scaling
ApsaraDB for MyBase dedicated clusters support two approaches to increasing CPU resources:
| Approach | How it works | When to use |
|---|---|---|
| Static scaling | Manually upgrade instance specifications for a fixed period | Traffic spikes you can predict and act on in advance |
| Auto scaling (this topic) | Policy-based: the cluster automatically increases CPU resources when utilization is high | Unexpected traffic spikes, or when you want to reduce manual O&M |
For static scaling, see Upgrade the specifications of an instance for short-term use.
How auto scaling works
Auto scaling is triggered when CPU utilization on an instance reaches 80%. The cluster then increases that instance's CPU resources based on the scale-up ratio you configure.
Example: A host with 16 cores and 128 GB memory runs eight instances, each with 4 cores and 8 GB memory. The CPU overcommit ratio is 200%. Without auto scaling, each instance is capped at 4 cores during a traffic spike. With auto scaling enabled and the default 50% scale-up ratio, the cluster can temporarily allocate up to 6 cores to the instance (4 cores × 1.5).
Supported configurations
Auto scaling for CPU resources has the following requirements:
-
Supported database engines: MySQL and PostgreSQL
-
For ApsaraDB MyBase for MySQL: the policy takes effect only on High-availability Edition instances
Prerequisites
Before you begin, ensure that you have:
-
An ApsaraDB for MyBase dedicated cluster running MySQL or PostgreSQL
-
(For MySQL) Instances of the High-availability Edition
Configure the auto scaling policy
-
Log on to the ApsaraDB for MyBase console.
-
In the upper-left corner, select a region.
-
In the left-side navigation pane, click Dedicated Clusters. Find the dedicated cluster you want to manage and click Details in the Actions column.
-
On the Dedicated Cluster Information page, click the Elasticity Policy tab.
-
Click Edit next to Elasticity Policy and set the scale-up ratio for CPU resources.
Note The default scale-up ratio is 50%. For example, a 50% ratio allows an instance with 4 cores to temporarily use up to 6 cores (4 × 1.5) when auto scaling is triggered. -
Click Save.
After you save the policy, wait approximately 3 minutes for the change to take effect.
What's next
To temporarily increase CPU resources for a specific instance during a predictable traffic spike, see Upgrade the specifications of an instance for short-term use.