Database Autonomy Service (DAS) provides the prediction-based auto scaling feature for ApsaraDB RDS for MySQL. This feature allows DAS to 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. 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. Go to the Autonomous Function Management panel.
    • In the left-side navigation pane, choose Autonomy Service > Diagnostics. On the page that appears, click the Autonomy Center tab. On the Autonomy Center tab, click Autonomy Service Settings.
    • In the left-side navigation pane, choose Autonomy Service > Dashboard. On the Performance Trends tab of the page that appears, click Autonomy Service Settings.
  3. On the Autonomous Function Settings tab of the panel that appears, click the Auto Scaling tab and then Add Policy. In the Add Policy panel, configure the following parameters.
    ParameterDescription
    Policy NameThe name of the policy.
    ModeThe mode of the policy. Select Prediction-based Auto Scaling.
    Note In this mode, DAS provides scaling suggestions but does not perform scaling operations.
    Engine TypeThe type of the database engine.
    Metric TypeThe type of the prediction metric. Select CPU Utilization (%).
    Destination ValueThe 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, find the policy that you want to apply and click Apply in the Actions column .
    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 Policy 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 Service > Diagnostics.
  3. On the Autonomy Center tab of the page that appears, select a time range and specify a filter to view the auto scaling events that occurred during the selected time range.
  4. Click Details in the Event: Database Workload Prediction section to view the details of prediction-based auto scaling.
    tx