Database Autonomy Service (DAS) provides scheduled auto scaling for ApsaraDB RDS for MySQL instances. Define a policy to scale up your instance before a predictable traffic spike — such as a promotion or a monthly billing cycle — and automatically restore it afterward to control costs.
For example, if your business peaks from 2:00 AM on the first day of every month through 2:00 AM on the third day, configure a monthly policy with those exact start and scale-back times. DAS scales the instance up before the peak and restores it once the window closes.
Prerequisites
Before you begin, ensure that you have:
-
An RDS MySQL 8.0 or 5.7 High-availability Edition instance with cloud disks (General-purpose)
-
A sufficient account balance to cover the scale-out charges
Billing
Scaling changes the instance type, which incurs specification-change charges. For pricing details, see Change specifications.
For N/A (Execute Only Once) mode, if you do not configure a Duration, the instance stays at the scaled-up type indefinitely. Configure Duration to avoid unexpected charges.
Usage notes
-
Each instance supports one auto scaling policy per mode (N/A, Daily, Weekly, or Monthly).
-
All time parameters are in UTC+8. Convert to your local time zone before configuring.
-
Failed policies are not retried. If a policy fails to execute, DAS does not attempt it again.
-
Modifying Duration or Scale-back Time after the instance has been scaled up applies the new time for the scale-back.
-
Scale-back does not occur in these situations:
-
The instance type was manually or automatically changed after the policy ran, and the current type differs from the policy's original type.
-
Scaling back would cause a metric to exceed its threshold. For example, if memory was scaled from 1 GB to 4 GB and 1 GB is already in use, scaling back would push memory utilization to 100%, so DAS skips the operation to protect your workload.
-
The instance is in a state that does not allow specification changes, such as Changing Specifications or Migrating.
-
Add a scheduled auto scaling policy
-
Go to the Instances page, select the region where your instance resides, and click the instance ID.
-
In the left navigation pane, go to Autonomy Services > Diagnostics > Autonomy Center, then click Autonomy Service Settings.
-
On the Autonomous Function Settings > Auto Scaling tab, click Add Policy and configure the following parameters:
Parameter Description Policy name A name for the policy. Mode Select Scheduled Auto Scaling. Engine type The database engine type. Specifications The target instance type for the selected engine. Operation Only Adjust Instance Specifications is supported. Valid from Start time (required): must be the current date or later. End time (optional): constrains when a recurring policy stops running. Has no effect for N/A (Execute Only Once) policies. If omitted for Daily, Weekly, or Monthly policies, the policy runs indefinitely. Recurrence The cycle for the scaling policy. See the recurrence options below. Recurrence options
Recurrence Scaling start time Scale-back parameter Notes N/A (Execute Only Once) Required Duration (optional, positive integer in hours) If Duration is omitted, the instance stays at the new type permanently. Daily Required Scale-back Time (required) Start and end can be on the same day (start < scale-back) or span midnight (start > scale-back). Minimum interval: 1 hour between start and scale-back, and at least 1 hour after the previous cycle's scale-back. If End Date falls within a cycle's window, that cycle is skipped. Weekly Required Scale-back Time (required) Same rules as Daily, applied within a week. If start > scale-back, the cycle spans into the following week. Monthly Required Scale-back Time (required) Same rules as Daily, applied within a month. If start > scale-back, the cycle spans into the following month. -
Click OK to save the policy.
-
In the Recommended Policies section, find the policy and click Apply in the Actions column.
To modify a saved policy, click Modify in the Actions column and make changes on the Update Policy tab. To remove the policy from an instance, click Cancel in the Applied Policies section.
-
On the Autonomous Function Management page, click OK.
-
(Optional) Configure Alert Configuration to receive notifications when scaling events occur. DAS recommends an alert template and automatically adds alert rules for the relevant autonomy events. Follow the on-screen prompts to complete the setup.
-
Select an Alert Contact Group to receive notifications. For more information, see Manage alert contacts.
-
Click Add Contact to add a new contact.
-
Click Create Contact Group to add a new group.
-
Click Edit or Remove in a contact's row to update or delete their information.
-
-
Confirm Associate with Resources.
-
Click Submit Configuration and confirm in the dialog box.
If an alert template already exists for this instance, the prompts guide you to add the new alert rules to that template. To configure the template and rules manually, see Configure an alert template and Configure alert rules.
-
View scaling results
-
Go to the Instances page, select the region, and click the instance ID.
-
In the left navigation pane, go to Autonomy Services > Diagnostics.
-
On the Autonomy Center page, check Auto-Scaling Events for the time range you want to review.
-
Click Details in an event row to see the full scaling history for that event.
FAQ
My instance can't scale out because it has reached the maximum specifications for its instance family. What can I do?
Purchase an instance with higher specifications from a different instance family. For example, the high-availability Dedicated instance type for RDS MySQL supports up to 104 cores and 768 GB of memory. After provisioning the new instance, migrate your data to it. See RDS for MySQL instance types and Migrate data between RDS instances.
What's next
-
To resize your instance as your business grows, see Change specifications.
-
To let DAS automatically adjust capacity in response to real-time workload changes, enable automatic performance scaling. Scheduled auto scaling and automatic performance scaling complement each other: use scheduled scaling for predictable peaks and automatic performance scaling to handle unexpected spikes.