Database Autonomy Service (DAS) provides the prediction-based auto scaling feature. This feature allows DAS to predict the metric values of an instance for the next 24 hours based on the historical data of the instance over the last 10 days. This topic describes how to create a prediction-based auto scaling policy.

Prerequisites

  • The following database services are supported:
    • ApsaraDB RDS for MySQL
    • PolarDB for MySQL
    • Redis
  • A DAS-linked role is created. For more information, see AliyunServiceRoleForDAS role.

Procedure

  1. Log on to the DAS console.
  2. Create a prediction-based auto scaling policy.
    • Create a prediction-based auto scaling policy on the Management and Settings page.
      1. In the left-side navigation pane, click Management and Settings.
      2. In the Auto Scaling Policies section, click Add Policy. In the Add Policy panel, configure the following parameters.
        Table 1. Configure 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
        • For ApsaraDB RDS for MySQL and PolarDB for MySQL, only CPU Utilization (%) is supported.
        • For Redis, only Memory Usage (%) is supported.
        Destination Value The predefined value of the prediction metric. If the predicted value of a metric is greater than or equal to the predefined value, scaling suggestions are provided.
      3. In the Auto Scaling Policies section, click Apply in the Actions column corresponding to the created policy.
      4. In the Apply Policies dialog box, select the database instances to which you want to apply the policy, and click xy.
      5. Click Confirm to apply the policy to the selected database instances.
    • Create a prediction-based auto scaling policy on the Autonomous Function Settings tab of the Autonomous Function Management panel.
      1. In the left-side navigation pane, click Instance Monitoring.
      2. On the page that appears, find the database instance for which you want to create a prediction-based auto scaling policy and click the instance ID. The instance details page appears.
      3. Click Autonomy Service Settings in the upper-right corner.
      4. On the Autonomous Function Settings tab of the Autonomous Function Management panel, click the Auto Scaling tab. In the Recommended Policy section, click Apply in the Actions column corresponding to a policy to apply the policy to the instance.
        Note
        • To create a prediction-based auto scaling policy, click Add Policy. For more information about how to configure the relevant parameters, see Table 1.
        • To modify a created policy, click Modify in the Actions column corresponding to the policy. In the Update Policy panel, update the policy settings.
        • To cancel the application of a policy to the instance, click Cancel in the Actions column corresponding to the policy in the Applied Policy section.

View the results of prediction-based auto scaling

  1. In the left-side navigation pane of the DAS console, click Instance Monitoring.
  2. On the page that appears, find the database instance for which prediction-based auto scaling is enabled and click the instance ID. The instance details page appears.
  3. In the left-side navigation pane, click Autonomy Center.
  4. On the Autonomy Center page, select a time range and filter the auto scaling events that occurred in the selected time range.
  5. Click Details in the Event: Database Workload Prediction section to view the details of prediction-based auto scaling.
    tx