All Products
Search
Document Center

ApsaraDB RDS:Use the prediction-based auto scaling feature

Last Updated:Nov 04, 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 for DAS is created. 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. In the Add Policy panel, 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.

    • If you no longer want to apply a policy to your RDS instance, click Cancel in the Actions column of the policy in the Applied Policies section.

  6. In the Autonomous Function Management panel, click OK.

  7. Optional. In the Alert Configuration section, configure an alert template and subscribe to alert notifications. This helps you understand the status of a prediction-based auto scaling task at the earliest opportunity.

    The system recommends an alert template and adds alert rules for the required autonomy events in the alert template. You can configure the alert template as prompted.

    Note
    • If you have configured an alert template for your RDS instance, you must add alert rules for the required autonomy event to the alert template as prompted.

    • If you do not configure an alert template for your RDS instance but want to configure one, you can configure the alert template by following the instructions provided in Configure alert templates and Configure alert rules.

    1. In the Select Alert Contact Group step, select an alert contact group.

      • Click Add Contact to add an alert contact.

      • Click Create Contact Group to create an alert contact group.

      • Find the alert contact that you want to manage and click Edit or Remove in the Actions column to modify or delete information about the alert contact.

      For more information, see Manage alert contacts.

    2. In the Associate with Resources step, confirm the associated resources.

    3. Click Submit Configuration. In the dialog box that appears, confirm the configuration.

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 upgrade the specifications of your RDS instance based on the expansion suggestions. For more information, see Change instance specifications.