All Products
Search
Document Center

ApsaraDB RDS:Use the prediction-based auto scaling feature

Last Updated:Jan 15, 2024

Database Autonomy Service (DAS) provides the prediction-based auto scaling feature for ApsaraDB RDS for MySQL to respond to business growth and heavy database loads. This feature can predict the metric values of an ApsaraDB RDS for MySQL instance for the next 24 hours based on the historical data of the RDS instance over the last 10 days and provide suggestions on prediction-based auto scaling. This topic describes how to create a prediction-based auto scaling policy.

Prerequisites

  • Your RDS instance runs one of the following MySQL versions and RDS editions:

    • MySQL 8.0 on RDS High-availability Edition, RDS Enterprise Edition, or RDS Cluster Edition

    • MySQL 5.7 on RDS High-availability Edition, RDS Enterprise Edition, or RDS Cluster Edition

    • MySQL 5.6 on RDS High-availability Edition

    • MySQL 5.5 on RDS High-availability Edition

  • A service-linked role is created for DAS. For more information, see AliyunServiceRoleForDAS role.

Procedure

  1. 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. Use one of the following methods to go to the Autonomous Function Management panel:

    • In the left-side navigation pane, choose Autonomy Services > Diagnostics. On the page that appears, click the Autonomy Center tab. In the upper-right corner of the Autonomy Center tab, click Autonomy Service Settings.

    • In the left-side navigation pane, choose Autonomy Services > Dashboard. On the Performance Trends tab of the page that appears, click Autonomy Service Settings.

  3. In the panel that appears, choose Autonomous Function Settings > Auto Scaling. On the tab that appears, click Add Policy. In the Add Policy panel, configure the following parameters.

    Parameter

    Description

    Policy Name

    The name of the policy.

    Mode

    The mode of the policy. Select Prediction-based Auto Scaling.

    Note

    In this mode, DAS provides scaling suggestions but does not perform scaling operations.

    Engine Type

    The type of the database engine.

    Metric Type

    The type of the prediction metric. Select CPU Utilization (%).

    Destination Value

    The predefined value of the prediction metric. If the value of the prediction metric is greater than or equal to the predefined value, scaling suggestions are provided.

  4. Click OK.

  5. In the Recommended Policies section, click Apply in the Actions column to add a policy to the RDS instance.

    Note
    • To modify a policy, click Modify in the Actions column that corresponds to the policy. In the Update Policy panel, update the policy settings.

    • To cancel the application of a policy to the RDS instance, click Cancel in the Actions column in the Applied Policies section.

View the results of prediction-based auto scaling

  1. 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 left-side navigation pane, choose Autonomy Services > Diagnostics.

  3. On the Autonomy Center tab, specify a time range and view the auto-scaling events that occurred within the specified time range.

  4. Click Details in the Event: Database Workload Prediction section to view the details of prediction-based auto scaling.

    tx

References

You can increase the specifications of your RDS instance based on the scaling suggestions and by following the instructions provided in Change instance specifications.