Prediction-based auto scaling

更新时间:
复制 MD 格式

To address performance challenges caused by business growth and high database workloads, Database Autonomy Service (DAS) provides prediction-based auto scaling. This feature forecasts performance metrics for the next 24 hours based on historical data from the past 10 days. When a predicted metric is expected to reach your specified threshold, DAS proactively provides a scaling suggestion.

Prerequisites

  • DAS supports the following database engines:

    • ApsaraDB RDS for MySQL

    • PolarDB for MySQL

    • Tair (Redis OSS-compatible)

  • A service-linked role for DAS has been created.

Procedure

  1. Log on to the DAS console.

  2. Add a prediction-based auto scaling policy.

    • Add a policy on the Management and Settings page.

      1. In the left-side navigation pane, choose Resource Management > Auto Scaling Settings.

      2. In the Auto Scaling Policies section, click Add Policy. In the Add Policy panel, configure the following parameters:

        Table 1. Parameters

        Parameter

        Description

        Policy Name

        The name of the policy.

        Mode

        The policy mode. Select Prediction-based Auto Scaling.

        Note

        This mode is forecast-only. It provides scaling suggestions but does not perform scaling operations.

        Engine Type

        The database engine type.

        Metric Type

        • For ApsaraDB RDS for MySQL and PolarDB for MySQL, only CPU Utilization (%) is supported.

        • For Tair (Redis OSS-compatible), only Memory Usage (%) is supported.

        Destination Value

        The target value for the forecast metric. DAS provides a scaling suggestion when the predicted value meets or exceeds this target.

      3. On the Apply Policiespage, select the checkbox for each database instance to which you want to apply the policy, and then click xy.

      4. Click OK to add the policy to the selected database instances.

        You can also apply a policy from the Auto Scaling Policies section. Find the policy and click Apply in the Actions column to apply it to a target database instance.

    • Add a prediction-based auto scaling policy on the Autonomous Function Management page of the instance's Autonomy Service Settings.

      1. In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.

      2. Find the target instance and click its ID to open the instance details page.

      3. In the upper-right corner of the page, click Autonomy Service Settings.

      4. On the Autonomous Function Management > Autonomous Function Settings > Auto Scaling tab, click Add Policy. Configure the parameters as described in Parameters.

      5. In the Recommended Policies section, find the policy that you want to add and click Apply in the Actions column.

        Note
        • To change a policy, click Modify in the Actions column. Make your changes on the Update Policy tab.

        • To stop applying a policy, click Cancel in the Actions column of the Applied Policies section.

      6. Click OK.

      7. Configure an Alert Template to receive timely notifications of prediction-based auto scaling events for your database instance.

        The system recommends an alert template and adds the required alert rules for autonomous events. Follow the prompts to complete the configuration.

        Note
        • If you have already configured an alert template for the instance, follow the prompts to add the required alert rules for autonomous events to the existing template.

        • To configure an alert template and alert rules yourself, see Configure alert templates and Configure alert rules.

      8. Select an Alert Contact Group to receive notifications.

        • Click Add Contact to add a new alert contact.

        • Click Add Contact Group to add a new alert contact group.

        • Click Modify or Remove next to a contact to modify or delete it.

        For more information, see Manage alert contacts.

      9. Click Submit Configuration and confirm the alert configuration in the dialog box that appears.

View prediction-based auto scaling results

  1. In the left-side navigation pane, choose Intelligent O&M Center > Instance Monitoring.

  2. Find the target instance and click its ID to open the instance details page.

  3. In the left-side navigation pane, click Autonomy Center.

  4. On the Autonomy Center page, view the Auto Scaling Events that occurred within the selected time range.

  5. Click Details for a Database Workload Prediction event to view details about the scaling suggestion.

    The full name of this event is Database Workload Prediction (Forecast Only), and its severity level is Notice.

Related documents

After you receive a scaling suggestion, you can scale up your database instance. For instructions, see the documentation for your engine type: