All Products
Search
Document Center

ApsaraDB RDS:Configure the automatic performance scaling feature

Last Updated:Jul 24, 2024

Continuous business development, data volume increase, and new service or feature release can cause the database traffic to increase and computing resources to be insufficient. If the issues occur, you can increase the computing resources of your RDS instance, such as CPU cores and memory capacity. Database Autonomy Service (DAS) provides the automatic performance scaling feature for your ApsaraDB RDS for MySQL instance to handle traffic spikes during peak hours. When traffic decreases, DAS automatically scales in the instance specifications to prevent resource waste.

Prerequisites

  • The RDS instance uses the subscription or pay-as-you-go billing method.

    Note

    If the RDS instance uses the serverless billing method, the system automatically scales the storage capacity of the RDS instance. You do not need to configure automatic performance scaling.

  • The RDS instance runs RDS High-availability Edition.

  • The RDS instance uses a general-purpose instance type.

  • The RDS instance uses the standard product type.

  • The region in which the RDS instance resides supports the anomaly detection feature of DAS. For more information, see Anomaly detection.

  • The balance in your Alibaba Cloud account is sufficient.

Note

If the RDS instance uses a phased-out instance type and cloud disks, the automatic performance scaling feature is not supported. To use the feature, you must change the instance type to an available instance type. For information about how to change the instance type of an RDS instance, see Change instance specifications.

Billing rules

  • Local disks: By default, the automatic performance scaling feature is disabled, and no fees are charged. If you enable the feature, you are charged based on the pay-as-you-go billing method.

    The unit price of the automatic performance scaling feature varies based on the region. The following table describes the unit prices in different regions.

    Region

    Unit price (USD per CPU core-hour)

    China (Zhangjiakou) and China (Ulanqab)

    0.063

    China (Hong Kong) and South Korea (Seoul)

    0.134

    Japan (Tokyo)

    0.100

    Malaysia (Kuala Lumpur) and India (Mumbai)

    0.102

    Singapore and Indonesia (Jakarta)

    0.155

    Germany (Frankfurt) and UK (London)

    0.078

    US (Virginia) and US (Silicon Valley)

    0.129

    UAE (Dubai)

    0.091

    Australia (Sydney)

    0.106

    Other regions

    0.083

    For RDS instances that use local disks, the automatic performance scaling feature is billed per minute, and a bill is generated once every hour on the hour. The fee for an automatic performance scaling operation is calculated by using the following formula: Hourly fee charged per CPU core × Number of CPU cores that are added × Scaling duration measured in hours.

    For example, an RDS instance resides in the China (Hangzhou) region and provides 4 CPU cores. If the RDS instance automatically scales out to 8 CPU cores and the scaling duration spans 30 minutes, you are charged USD 0.166 based on the following calculation: USD 0.083 (the unit price per CPU core-hour) × 4 (the number of CPU cores that are added) × 0.5 (the scaling duration measured in hours) = USD 0.166. The unit price in the China (Hangzhou) region is USD 0.083 per CPU core-hour.

  • Cloud disks: By default, the automatic performance scaling feature is disabled, and no fees are charged. If you enable the feature, you are charged based on the new instance type that is selected during automatic performance scaling. The scaling pricing varies based on the instance configurations, such as the region and the new specifications. For more information, visit the ApsaraDB RDS buy page.

Usage notes

流程图

Item

RDS instances that use cloud disks

RDS instance that uses local disks

Expandable items

  • Instance type, which specifies the number of CPU cores and the memory capacity

  • IOPS

  • Maximum number of connections

Note
  • When the conditions for automatic scale-ups are met, the system automatically computes appropriate specifications for the RDS instance. This process can continue until the maximum specifications that are allowed are reached.

  • After an automatic scale-up is complete, the IOPS and the maximum number of connections simultaneously increase. For more information about the IOPS and maximum number of connections that are supported by each instance type, see Primary ApsaraDB RDS instance types.

  • CPU

  • IOPS

Note
  • The number of CPU cores is increased by twice the original number of CPU cores and can be increased only once. After the number of CPU cores is increased during an automatic scale-up, the number of CPU cores can no longer be increased in subsequent possible automatic scale-ups.

  • The IOPS increases by 1,000 for every CPU core that is added.

Scale-down

Automatic scale-downs are supported.

You cannot configure automatic sale-down settings for automatic performance scaling on the Basic Information page. Instead, you can choose Autonomy Services > Automatic Performance Scaling to configure automatic scale-down settings. For more information, see Use the automatic performance scaling feature.

Automatic scale-downs are supported.

Note

If the CPU utilization remains lower than 30% during 99% of the scale-down observation window, the system automatically scales down the number of CPU cores and IOPS to the original specifications.

Availability

An instance switchover occurs.

Important
  • An instance switchover may occur during the period of time for the specification change to take effect. Make sure that your application is configured to automatically reconnect to the RDS instance. For more information about the impacts of an instance switchover, see Impacts of an instance switchover.

  • If you enable persistent connections of the database proxy feature, the connection between your application and the database proxy remains valid during an automatic switchover. For more information, see Configure persistent connection settings and Enable the database proxy feature.

No instance switchovers occur.

Note

An automatic scale-up or an automatic scale-down can be completed within 30 seconds. No transient connections occur during the scale-up or scale-down process.

Limits

  • For RDS instances that use local disks, the automatic performance scaling feature can scale up only the number of CPU cores and the IOPS and does not scale up the memory capacity or the maximum number of connections.

  • RDS instances that use local disks cannot automatically scale up if the hosts on which the instances are deployed cannot provide sufficient resources. The probability of a host failing to provide sufficient resources is less than 1%.

  • Scale-ups are performed only on primary RDS instances that use local disks. If a primary/secondary switchover is triggered after the primary RDS instance is scaled out, one of the following situations occurs:

    • If the primary RDS instance (original secondary RDS instance) meets the conditions to trigger a scale-up or a scale-down, the system performs the scaling operation on the primary RDS instance.

    • If the secondary RDS instance (original primary RDS instance) meets the conditions to trigger a scale-down, the system scales the secondary RDS instance down to the original specifications.

Impacts

  • When the new specifications are being applied to an RDS instance, an instance switchover occurs. Make sure that your application is configured to automatically reconnect to the RDS instance. For more information about the impacts of an instance switchover, see Impacts of an instance switchover.

  • If an RDS instance does not run the latest minor engine version, DAS updates the minor engine version of the RDS instance to the latest version during a specification change. This ensures the performance and stability of the RDS instance.

  • After you enable the automatic performance scaling feature for an RDS instance, the system assigns the AliyunServiceRoleForDAS service-linked role to DAS. This way, DAS can access the resources that are related to ApsaraDB RDS.

Procedure

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. In the Configuration Information section of the page that appears, click Settings next to Automatic Performance Scaling.

  3. In the dialog box that appears, configure the following parameters.

    Instance category

    Parameter

    Description

    General-purpose RDS instance

    Automatic Performance Scaling

    Specifies whether to enable the automatic performance scaling feature.

    CPU Trigger Threshold

    The average CPU utilization threshold in percentage based on which the system scales up the RDS instance. Unit: percentage (%).

    Valid values:

    • Valid values for an RDS instance that uses local disks: 70 to 90.

    • Valid values for an RDS instance that uses cloud disks: 50 to 90

    You can adjust the threshold at a step size of 10%.

    RDS instance that uses cloud disks

    Observation Window

    The time range during which you want to observe the CPU utilization of the RDS instance. Valid values:

    5 minutes, 20 minutes, 30 minutes, 40 minutes, and 60 minutes

    Note

    The system periodically checks the CPU utilization of the RDS instance during the observation window. If the CPU utilization reaches the value of the CPU Trigger Threshold parameter, an automatic scale-up is triggered.

    Upper Limit of Specifications

    The maximum specifications that are supported by the automatic performance scaling feature.

    If the average CPU utilization of the RDS instance reaches the value of the CPU Trigger Threshold parameter over the specified observation window, DAS scales up your RDS instance based on your business requirements. If the average CPU utilization of the RDS instance reaches the value of the CPU Trigger Threshold parameter again over the specified observation window, DAS scales up the RDS instance again. This process continues until the specifications of the RDS instance reach the maximum specifications that are allowed.

    Important

    If the RDS instance uses an instance type that provides 1 CPU core and 2 GB of memory and an automatic scale-up is triggered, the specifications of the RDS instance are upgraded to 4 CPU cores and 8 GB of memory. In this case, you must configure the maximum specifications to which the RDS instance can be scaled up to 4 CPU cores and 8 GB of memory or above. Otherwise, the scale-up fails.

    RDS instance that uses local disks

    Scale-up Observation Window

    The time range during which you want to observe the CPU utilization of the RDS instance and trigger an automatic scale-up. Valid values:

    1 minute, 3 minutes, 5 minutes, 10 minutes, 20 minutes, and 30 minutes

    Note

    The system periodically checks the CPU utilization of the RDS instance during the scale-up observation window. If the CPU utilization reaches the value of the CPU Trigger Threshold parameter, an automatic scale-up is triggered.

    Scale-down Observation Window

    The time range during which you want to observe the CPU utilization of the RDS instance and trigger an automatic scale-down. Valid values:

    1 minute, 3 minutes, 5 minutes, 10 minutes, 20 minutes, and 30 minutes

    Note

    The system periodically checks the CPU utilization of the RDS instance during the scale-down observation window. If the CPU utilization remains below 30% for 99% of the scale-down observation window, an automatic scale-down is triggered.

  4. Click OK.

    In the Configuration Information section of the page, the status of Automatic Performance Scaling changes to Enabled.