In PolarDB for MySQL, a cluster can be automatically scaled up/out and back. You can set this feature on the Basic Information page of your PolarDB for MySQL cluster. This topic describes how to set this feature.

Background information

It takes at least 15 minutes for automatic configuration changes to take effect. We recommend that you do not use this configuration change method during short-term business surges. If you do not want the system to automatically scale your cluster back after a scale-up/out, you can choose not to enable Auto Scaling-in. PolarDB for MySQL provides multiple configuration change methods.

  • Manual configuration change: If you want to permanently change the configuration of your PolarDB cluster, we recommend that you manually upgrade or downgrade the cluster. For more information, see Manually upgrade or downgrade a PolarDB cluster.
  • Temporary scale-up: This method is suitable for short-term business surges. For more information, see Temporary upgrade.
  • Automatic configuration change (auto scaling): The system can automatically scale your clusters based on your business workloads. This feature is not suitable for short-term business surges.
  • DAS-based scaling: If your business frequently experiences drastic fluctuations, we recommend that you use the auto scaling provided by Database Autonomy Service (DAS). For more information, see Configure the auto scaling feature of DAS.


  • The PolarDB for MySQL cluster is of the Cluster Edition or X-Engine Edition. Single Node Edition and Multi-master Cluster (Database/Table) Edition do not support this feature. For more information about cluster editions, see Overview of editions.
  • No cluster specification change tasks are being performed for the PolarDB cluster.


Both the pay-as-you-go and subscription billing methods are supported for this feature.


Pay-as-you-go clusters are charged on an hourly basis. After you change the configuration of a pay-as-you-go cluster, the cluster is charged at the new price on an hourly basis.

Change typeDescription
Upgrade specifications or add nodesPayment = Total fees of the new configuration for the remaining subscription period (Monthly price of the new configuration/30/24 × Remaining subscription period measured in hours) - Total fees of the original configuration for the remaining subscription period (Monthly price of the original configuration/30/24 × Remaining subscription period measured in hours)

For example, the monthly price of the new configuration is USD 14,400. The monthly price of the original configuration is USD 7,200. The remaining subscription period is 50 days. The payment is calculated based on the following formula: (USD 14,400/30/24 × 50 × 24) - (USD 7,200/30/24 × 50 × 24) = USD 12,000.

Downgrade specifications or delete nodes

Refund = Total fees of the original configuration for the remaining subscription period (Monthly price of the original configuration/30/24 × Remaining subscription period measured in hours) - Total fees of the new configuration for the remaining subscription period (Monthly price of the new configuration/30/24 × Remaining subscription period measured in hours).

For example, to purchase a subscription cluster for three months, you are charged USD 3,500. You pay USD 3,000 for the cluster after you use coupons. After two months, the total fees of the original configuration for the remaining subscription period become USD 1,000. The total fees of the new configuration for a month are USD 800. The refund is calculated based on the following formula: USD 1,000 - USD 800 = USD 200.

Note You can receive a refund for a downgraded configuration of a subscription cluster. However, fees for the entire cluster cannot be refunded. If you want to apply for a refund for the entire cluster, submit a ticket. If your application is approved, your subscription cluster is frozen and will be deleted after 14 days.
The billing rules for manual scaling and automatic scaling are the same. For more information, see Configuration change fees.

Refunds for cluster downgrade

When the specifications of a subscription cluster exceed your business requirements and your account has the configuration downgrade privilege, you can downgrade the configurations of the cluster in real time. For information about the refund policy, see Rules for unsubscribing from resources.


  • You can upgrade or downgrade only clusters. You cannot upgrade or downgrade a single node in a cluster.
  • When you upgrade or downgrade a cluster, data stored in the cluster is not affected.
  • During the upgrade or downgrade process, your applications are temporarily disconnected from the cluster for no more than 30 seconds. We recommend that you upgrade or downgrade your cluster during off-peak hours and make sure that your applications are configured with the automatic reconnection mechanism.
  • A cluster upgrade or downgrade has minor impacts on the primary node of a PolarDB cluster. However, the upgrade or downgrade degrades the performance of read-only nodes in the cluster. As a result, the read-only nodes require more time to handle requests during the upgrade or downgrade process.


  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. On the Clusters page, click the ID of the cluster.
  4. On the Overview page, click Settings in the upper-right corner of the Database Nodes section.
  5. In the dialog box that appears, configure the following parameters.
    Auto Scaling-outSpecifies whether to enable the auto scaling feature.
    Observation PeriodIf the CPU utilization reaches the specified threshold during the observation period, PolarDB automatically adds nodes or upgrades the specifications of your cluster when the observation period ends. The system determines the scaling method based on the incoming read and write requests. The minimum observation period is 5 minutes, and a scaling activity needs 15 minutes to be completed. Therefore, it takes at least 15 minutes for the auto scaling to take effect. For example, if the observation period is 5 minutes and the time required to complete a scaling activity is 10 minutes, you must wait 15 minutes before you can check the scaling result.
    CPU UsageThe average CPU utilization threshold over which auto scaling is triggered. If the CPU Usage is greater than or equal to the specified value, an auto scale-out activity is triggered.
    Maximum SpecificationThe highest specifications to which a cluster can be upgraded. After an auto scaling is triggered, the system may upgrade the specifications of the PolarDB cluster tier-by-tier until the highest specifications are applied. For example, the cluster is upgraded from 4 cores to 8 cores, and then to 16 cores.
    Maximum Number of Read-only NodesThe maximum number of read-only nodes that can be automatically added to the cluster. After an auto scaling is triggered, the system adds one or two read-only nodes each time until the specified upper limit is reached.
    • The nodes that are automatically added are associated with the default cluster endpoint. If the cluster uses a custom endpoint, you must specify whether to associate these nodes with the endpoint by specifying the Automatically Associate New Nodes parameter. For more information about Automatically Associate New Nodes, see Configure PolarProxy.
    • If you want the system to perform only scale-up and no scale-out, set this parameter to the current number of read-only nodes of the cluster.
    • During a scale-up, transient connections occur to all nodes of the cluster. This does not occur during a scale-out.
    Auto Scaling-inSpecifies whether to enable automatic scale-back.
    Note After Auto Scaling-in is enabled, if the average CPU utilization of automatically scaled nodes remains at less than 30% for more than 99% of the quiescent period, the PolarDB cluster is scaled back tier-by-tier to the original specifications when the quiescent period ends.
    Quiescent PeriodThe minimum interval between two scaling activities. During a quiescent period, PolarDB monitors the resource usage of a cluster but does not trigger scaling activities. If a quiescent period and an observation period end at the same time and the CPU utilization reaches the threshold value within the observation period, PolarDB automatically triggers the auto scaling operation.
  6. Click OK.
You can disable auto scaling at any time. If the cluster has been automatically scaled up/out but has not been scaled back when you disable auto scaling, the cluster will not be scaled back to its original configurations.