All Products
Search
Document Center

Database Autonomy Service:Scheduled auto scaling

Last Updated:Dec 23, 2024

Database Autonomy Service (DAS) provides the scheduled auto scaling feature. You can use this feature to scale up your database instance in a specific period of time. This helps you handle periodic changes in database loads such as a large number of requests within specific time periods, or heavy traffic during sales promotions. After the specified scaling period elapses, your instances are automatically scaled back to the original specifications. This helps meet your business requirements and reduce costs.

Prerequisites

The database instance that you want to manage must meet the following requirements:

  • The database instance is of one of the following types:

    • ApsaraDB RDS for MySQL Standard Edition instances in the x86 architecture or General-purpose ApsaraDB RDS for MySQL High-availability Edition instances that use standard SSDs or Enterprise SSDs (ESSDs).

      Note

      The scheduled auto scaling feature is unavailable for read-only ApsaraDB RDS for MySQL instances.

    • General-purpose or dedicated PolarDB for MySQL Cluster Edition clusters.

    • Cloud-native (cloud disk-based) instances of Redis Open-Source Edition in the standard architecture or cloud-native (cloud disk-based) instances of Tair (Enterprise Edition) in the standard architecture.

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

  • Your Alibaba Cloud account has sufficient balance to pay for the costs of scaled-up resources.

Precautions

  • To scale up a database instance on a regular basis, you must configure a scheduled auto scaling policy for the database instance.

  • All time-related parameters are displayed in UTC+8. If this time zone is not supported in your region, you must convert the time before you configure the parameters.

  • You can apply only one auto scaling policy of each mode to a database instance.

  • Retry intervals are not supported for scheduled auto scaling policies. If a scheduled auto scaling policy fails to be executed, the system does not retry to execute the policy.

  • If the Duration or Scale-back Time parameter is modified after an instance is scaled up, the instance is scaled back to the previous specifications based on the new time specified by either of the two parameters.

  • In the following scenarios, the database instance may not be scaled back to its previous specifications even if the Duration or Scale-back Time parameter is specified:

    • The specifications of the database instance are manually or automatically changed again after the scheduled auto scaling policy is executed. If the instance specifications are different from those specified in the policy, the database instance is not scaled back.

    • One or more metrics of the database instance do not meet specific standards. For example, the memory of an instance is scaled up from 1 GB to 4 GB based on a scheduled auto scaling policy. If 1 GB of memory has been used before the instance is scaled back, the scale-back operation is not performed because the memory usage increases to 100% during the operation. This ensures the stability and security of your business.

    • The instance is in a state in which specification changes are not allowed, such as the Changing Specifications or Migrating state.

Examples

DAS performs scaling operations on your instances once or on a regular basis. DAS may scale your instances every day, week, or month. For example, if the peak hours of your business start at 2:00 on the first day of every month and end at 2:00 on the third day of every month, you can use the scheduled auto scaling feature to scale up your instances during peak hours and scale the instances back during off-peak hours.

Billing

When you change the specifications of a database instance by using the scheduled auto scaling feature, you are charged for the configuration changes of the instance.

  • For information about the fees that you are charged for the configuration changes of ApsaraDB RDS for MySQL instances, see Configuration changes.

  • For information about the fees that you are charged for the configuration changes of PolarDB for MySQL clusters, see Configuration change fees.

  • For information about the fees that you are charged for the configuration changes of Tair (Redis OSS-compatible) instances, see Configuration changes.

Create a scheduled auto scaling policy

  1. Log on to the DAS console.

  2. Create a scheduled auto scaling policy.

    • Create a scheduled auto scaling policy on the Management and Settings page.

      1. In the left-side navigation pane, click Management and Settings.

      2. On the Auto Scaling Policies page, click Add Policy. In the Add Policy panel, configure parameters for the scheduled auto scaling policy.

        Table 1. Parameters

        Parameter

        Description

        Policy Name

        The name of the policy.

        Mode

        The mode of the policy. Select Scheduled Auto Scaling.

        Engine Type

        The type of the database engine.

        Specifications

        The specifications of the selected database engine.

        Operation

        • The operations to be performed. For ApsaraDB RDS for MySQL instances and Redis instances, only Adjust Instance Specifications is supported.

        • For PolarDB for MySQL clusters, Adjust Instance Specifications and Increase Number of Read-only Nodes are supported.

        Valid From

        The time range during which the policy is effective.

        • Start time is a required parameter. You must set this parameter to a date no earlier than the current date.

        • End time is an optional parameter.

          • If you set the Recurrence parameter to N/A(Execute Only Once), the scheduled auto scaling policy is executed only once and is not subject to the End time parameter.

          • If you set the Recurrence parameter to Daily, Weekly, or Monthly and leave the End time parameter empty, the scheduled auto scaling policy is repeatedly executed based on the specified cycle. If you specify an end time, the system stops executing the policy after the end time.

        Recurrence

        The interval at which the scaling operation is performed. Valid values:

        • N/A(Execute Only Once)

          • Scaling Start Time: You must configure this parameter.

          • Duration: You can configure this parameter or leave this parameter empty. Set this parameter to a positive integer. Unit: hours.

            • If you leave this parameter empty, the instance is not scaled back after the auto scaling policy is executed.

            • If you configure this parameter, the instance is scaled back to its original specifications after the auto scaling policy is executed.

        • Daily:

          • Scaling Start Time: You must configure this parameter.

          • Scale-back Time: You must configure this parameter.

            • If the scaling start time is earlier than the scale-back time, the two points in time of a single execution of the policy are within the same day.

            • If the scaling start time is later than the scale-back time, the two points in time of a single execution of the policy are not within the same day. The instance is scaled back one day after the scaling starts.

            Note
            • The scale-back time must be at least 1 hour later than the scaling start time.

            • The scaling start time must be at least 1 hour later than the scale-back time of the previous execution of the policy.

            • If you specify an end time and the end time is set to a date between the scaling start time and scale-back time of the last execution of the policy, the last execution of the policy is not performed.

        • Weekly:

          • Scaling Start Time: You must configure this parameter.

          • Scale-back Time: You must configure this parameter.

            • If the scaling start time is earlier than the scale-back time, the two points in time of a single execution of the policy are within the same week.

            • If the scaling start time is later than the scale-back time, the two points in time of a single execution of the policy are not within the same week. The instance is scaled back within the subsequent week after the scaling starts.

            Note
            • The scale-back time must be at least 1 hour later than the scaling start time.

            • The scaling start time must be at least 1 hour later than the scale-back time of the previous execution of the policy.

            • If the end time is set to a date between the scaling start time and scale-back time of the last execution of the policy, the last execution of the policy is not performed.

        • Monthly

          • Scaling Start Time: You must configure this parameter.

          • Scale-back Time: You must configure this parameter.

            • If the scaling start time is earlier than the scale-back time, the two points in time of a single execution of the policy are within the same month.

            • If the scaling start time is later than the scale-back time, the two points in time of a single execution of the policy are not within the same month. The instance is scaled back within the subsequent month after the scaling starts.

            Note
            • The scale-back time must be at least 1 hour later than the scaling start time.

            • The scaling start time must be at least 1 hour later than the scale-back time of the previous execution of the policy.

            • If the end time is set to a date between the scaling start time and scale-back time of the last execution of the policy, the last execution of the policy is not performed.

      3. In the Auto Scaling Policies section, find the policy that you created and click Apply in the Actions column.

      4. In the Apply Policies dialog box, select the database instances to which you want to apply the policy, and click the p202202071 icon.

      5. Click Confirm to apply the policy to the selected database instances.

    • Create a scheduled 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 to which you want to apply a scheduled auto scaling policy and click the instance ID. The instance details page appears.

      3. On the instance details page, 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 Applied Policies section, click Add Policy to create a scheduled scaling policy. For more information, see the Table 1. Parameters section of this topic.

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

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

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

      6. Click OK.

      7. In the Alert Configuration section, configure an alert template and subscribe to alert notifications. This helps you understand the status of the scheduled auto scaling policy at the earliest opportunity.

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

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

        • If you need to configure an alert template and alert rules for your database instance, see Configure alert templates and Configure alert rules.

      8. In the Select Contact Group section, 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 the information about the alert contact or remove the alert contact.

        For more information, see Manage alert contacts.

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

View the results of scheduled 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 scheduled auto scaling is enabled and click the instance ID. The instance details page appears.

  3. In the left-side pane of the instance details page, click Autonomy Center.

  4. On the Autonomy Center page, select a time range to view the auto scaling events that occurred during the selected time range.

  5. Click Details in the Auto-Scaling Events section to view the details of scheduled auto scaling events.

    p202202081

FAQ

What do I do if the specifications of the instance have reached the upper limit?

We recommend that you purchase an instance of higher specifications. For example, you can purchase a dedicated ApsaraDB RDS for MySQL High-availability Edition instance that supports a maximum of 104 vCPUs and 768 GB of memory. Then, migrate your instance data to the new instance. For more information about the specifications of database instances and data migration scenarios, see the following topics:

References

For information about how to change the specifications of your instances, see the following topics: