AnalyticDB for MySQL uses resource scaling plans to automatically scale resources. This feature is ideal for business workloads with predictable peak and off-peak hours or for addressing bottlenecks in computing or storage resources. When the business workload increases, the system automatically adds resources to ensure your cluster maintains high performance and stability. During periods of low workload, the system removes resources to save costs. Unlike manual scaling, resource scaling does not require data migration and does not affect reads and writes. You can create a resource scaling plan in the console or via the API.
Prerequisites
To check your cluster edition, go to the Clusters page in the AnalyticDB for MySQL console. Click your cluster ID to find the edition in the Cluster Attributes area.
Enterprise Edition, Basic Edition, and Data Lakehouse Edition clusters have no limitations.
Data Warehouse Edition clusters must meet the following requirements:
The cluster must be in Elastic mode.
The cluster must have at least 32 cores and 128 GB.
The cluster supports Default Proportional Scaling for Computing Resources and EIUs if its kernel version is 3.1.3.2 or later.
The cluster supports Scaling for Computing Resources and Scaling for EIUs if its kernel version is 3.1.6.1 or later and it is a new pricing model cluster.
NoteTo view and update the minor version, go to the Configuration Information section on the Cluster Information page in the AnalyticDB for MySQL console.
Usage notes
-
During the scaling process, you cannot submit an asynchronous job by using the
SUBMIT JOBstatement. If your business depends on this feature, schedule the scaling operation for a suitable time. -
A brief connection interruption may occur as the scaling operation completes. We recommend performing this operation during off-peak hours or ensuring that your application has an automatic reconnection mechanism.
When Basic Edition, Data Warehouse Edition elastic mode, and Standalone Edition clusters undergo scaling, they become unavailable for read, write, and management operations. Perform this operation during off-peak hours and ensure your application has a reconnection mechanism. Normal operations resume after scaling is complete.
The success rate of resource scaling depends on the underlying resource inventory. Because the inventory changes dynamically, a 100% success rate cannot be guaranteed for either scale-up or scale-down operations.
Billing
Resources provisioned by a resource scaling plan are billed on a pay-as-you-go basis. For details about billing, see Billable items of ACU elastic resources in Enterprise Edition and Basic Edition, Billable items of ACU elastic resources in Data Lakehouse Edition, Billable items of elastic computing resources in Data Warehouse Edition, or Billable items of elastic I/O resources in Data Warehouse Edition.
Resource scaling plan types
Enterprise Edition and Basic Edition
Enterprise Edition and Basic Edition use a compute-storage coupled architecture and let you scale the reserved resources of a cluster.
Data Lakehouse Edition
Data Lakehouse Edition provides the following three types of resource scaling plans:
Interactive Resource Group: Scales only computing resources based on the target specifications in the resource scaling plan. This plan is suitable when computing resources are a bottleneck.
Default Proportional Scaling for EIUs: Scales storage resources proportionally when an Interactive Resource Group plan runs. This plan is ideal for workloads with predictable peak and off-peak hours.
EIU: Scales only storage resources based on the target specifications in the resource scaling plan. This plan is suitable when storage resources are a bottleneck, such as performing daily batch data imports for business intelligence (BI) analysis.
Data Warehouse Edition
Data Warehouse Edition provides the following three types of resource scaling plans:
Scaling for Computing Resources: Scales out computing resources based on their original specifications. This plan is suitable when computing resources are a bottleneck.
Default Proportional Scaling for Computing and Elastic I/O Resources: Scales out computing resources based on their original specifications and scales up elastic I/O resources by the same proportion. This plan is ideal for workloads with predictable peak and off-peak hours.
Scaling for EIUs: Scales up elastic I/O resources. This plan is suitable when storage resources are a bottleneck, such as performing daily batch data imports for BI analysis.
Create a resource scaling plan
Enterprise Edition and Basic Edition
Precautions
You cannot perform manual scaling on a cluster while a resource scaling plan is active. To manually scale the cluster, you must first disable the plan. You can re-enable the plan after the manual scaling is complete. For instructions on how to disable a plan, see Manage resource scaling plans.
Procedure
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. On the Enterprise Edition or Basic Edition tab, find the cluster that you want to manage and click the cluster ID.
-
In the left-side navigation pane, choose Cluster Management > Resource Management.
On the Resource Management page, go to the Scaling Plans>Resource Scaling Plans tab and click Create Plan in the upper-right corner.
In the Create Resource Scaling Plan panel, set the following parameters.
Parameter
Description
Plan Name
The name of the resource scaling plan.
Desired Specifications per Reserved Resource Set
The target specifications for the scaling operation. These specifications cannot be lower than the single-node specifications of the cluster's reserved resources.
For an Enterprise Edition cluster, each group of reserved resources contains three nodes. You can view the number of nodes in the Configuration Information section of the Cluster Information page to calculate the number of resource groups. For example, if 48 ACU (8 ACU*6 nodes) is displayed, this indicates two groups of reserved resources. If you scale each group to 36 ACUs, the total reserved resources will be 72 ACUs (36 ACUs/group × 2 groups).
For a Basic Edition cluster, each group of reserved resources contains one node. You can view the number of nodes in the Configuration Information section of the Cluster Information page to calculate the number of resource groups. For example, if 8 ACU (8 ACU*1 node) is displayed, it means there is one group of reserved resources. If you scale each group to 24 ACUs, the total amount of reserved resources becomes 24 ACUs (24 ACUs/group × 1 group).
Scaling Cycle
The recurring days for the scaling operation.
Support every day, Monday to Sunday each week, the 1st to 31st of each month, as well as the 3rd to last day, the 2nd to last day, and the last day of each month.
Scaling Time (Cluster-specific)
The time when the system automatically scales the reserved resources to the specifications defined in Desired Specifications per Reserved Resource Set.
ImportantTo run a scaling plan on the day of its creation or modification, set the scaling time to be at least 1 hour after the current time. For more information, see When does a resource scaling plan take effect?.
The time interval between the scaling times of multiple resource scaling plans must be at least 1 hour.
Enabled
Specifies whether to enable the resource scaling plan. The plan is enabled by default.
To pause the plan later, find it in the Resource Scaling Plans list and click Disable.
Effective Date
The start date from which the resource scaling plan is effective. This date is inclusive.
Expiration Date
The date the resource scaling plan expires. This date is inclusive. For example, if the Expiration Date is September 30, 2024, the plan expires after 23:59:59 on that day.
When a resource scaling plan expires, it no longer performs scheduled scaling operations. However, the system does not automatically restore the resources to their initial specifications. To restore resources to their initial specifications at a specific time, create another resource scaling plan and set Desired Specifications per Reserved Resource Set to the initial specifications. For more information, see Schedule resource scale-out and scale-in for a Data Lakehouse Edition cluster or Schedule resource scale-out and scale-in for an Enterprise Edition or Basic Edition cluster.
Click OK.
The new plan appears in the Resource Scaling Plans list, showing details such as Plan Name, Desired Specifications, Status, and Next Effective Time (Cluster-specific).
Data Lakehouse Edition
Precautions
You cannot perform manual scaling on a cluster while a resource scaling plan is active. To manually scale the cluster, you must first disable the plan. You can re-enable the plan after the manual scaling is complete. For instructions on how to disable a plan, see Manage resource scaling plans.
You cannot simultaneously apply a resource scaling plan (such as an Interactive Resource Group plan or a Default Proportional Scaling for EIUs plan) and the Multi-Cluster model (which involves setting maximum and minimum cluster counts for a resource group) to the same interactive resource group.
You cannot enable an EIU scaling plan and a Default Proportional Scaling for EIUs plan at the same time.
You cannot enable multiple Default Proportional Scaling for EIUs plans at the same time.
A Default Proportional Scaling for EIUs plan takes effect only if an Interactive Resource Group scaling plan is also enabled.
If the cluster's reserved storage resources are 0 ACU, you can only create Interactive Resource Group scaling plans.
Procedure
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. On the Data Lakehouse Edition tab, find the cluster that you want to manage and click the cluster ID.
-
In the left-side navigation pane, choose Cluster Management > Resource Management.
On the Resource Management page, go to the Scaling Plans>Resource Scaling Plans tab and click Create Plan in the upper-right corner.
In the Create Resource Scaling Plan panel, set the following parameters.
Set the Plan Name, Start Date, and End Date.
Parameter
Description
Plan Name
The name of the resource scaling plan.
Effective Date
The start date from which the resource scaling plan is effective. This date is inclusive.
Expiration Date
The date the resource scaling plan expires. This date is inclusive. For example, if the Expiration Date is set to September 30, 2024, the plan expires after 23:59:59 on that day.
Select a Scaling Type and configure its parameters. For information about the differences between scaling resource types, see Types of resource scaling plans.
Interactive resource group
Parameter
Description
Scaling Type
Select Interactive Resource Group.
Resource Group
Select the interactive resource group for which you want to scale compute resources.
You can select only an interactive resource group for which the Multi-Cluster feature is disabled.
Desired Specifications
The target compute resource specifications.
Scaling Cycle
The recurring days for the scaling operation.
Scaling Time (Cluster-specific)
The time when the system automatically scales the compute resources of the interactive resource group to the desired specifications.
ImportantTo run an interactive resource group scaling plan on the same day you create or modify it, make sure the scaling time meets the following requirements:
If no Default Proportional Scaling for EIUs plan is enabled, the interval between the scaling time and the current time must be at least 10 minutes.
If a Default Proportional Scaling for EIUs plan is enabled, the interval between the scaling time and the current time must be at least 1 hour.
For more information, see When does a resource scaling plan take effect?.
If you have multiple interactive resource group scaling plans, their scaling times must be separated by the following minimum intervals:
If a Default Proportional Scaling for EIUs plan is enabled, the time interval must be at least 1 hour.
If no Default Proportional Scaling for EIUs plan is enabled, the time interval must be at least 10 minutes.
Enabled
Specifies whether to enable the resource scaling plan. The plan is enabled by default.
To pause the plan later, find it in the Resource Scaling Plans list and click Disable.
EIU
Parameter
Description
Scaling Type
Select EIU.
Desired Specifications per EIU
The target specifications for each EIU resource group. These specifications cannot be lower than the single-node specifications of the cluster's reserved storage resources.
Scaling Cycle
The recurring days for the scaling operation.
Scaling Time (Cluster-specific)
The time when the system automatically scales each EIU resource group to the desired specifications.
ImportantTo run an EIU scaling plan on the same day you create or modify it, set the scaling time to be at least 1 hour after the current time.
The time interval between multiple EIU scaling plans must be at least 1 hour.
Default Proportional Scaling for EIUs
This switch is off by default, meaning EIU resources are scaled independently.
If you turn on this switch, the system scales EIU resources proportionally with the compute resources of an interactive resource group. For this plan to take effect, you must also create and enable an interactive resource group scaling plan.
Enabled
Specifies whether to enable the resource scaling plan. The plan is enabled by default.
To pause the plan later, find it in the Resource Scaling Plans list and click Disable.
Click OK.
The new plan appears in the Resource Scaling Plans list, showing details such as Plan Name, Desired Specifications, Status, and Next Effective Time (Cluster-specific).
Data Warehouse Edition
Procedure
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. On the Data Warehouse Edition tab, find the cluster that you want to manage and click the cluster ID.
In the left-side navigation pane, click Elastic Resource Scaling.
On the Elastic Resource Scaling page, go to the Resource Scaling Plans tab and click Create Plan in the upper-right corner.
In the Create Resource Scaling Plan panel, set the following parameters.
Parameter
Description
Scaling Type
Select a scaling resource type. For information about the differences between scaling resource types, see Types of resource scaling plans.
Plan Name
The name of the resource scaling plan.
Resource Group
Select the resource group for which you want to scale resources.
Effective Date
The date the plan becomes effective. This date is inclusive. The exact time the plan takes effect depends on when it is created or modified. For more information, see When does a resource scaling plan take effect?.
Expiration Date
The date the plan expires. This date is inclusive.
Scaling Time
The time at which the system automatically scales out resources of the selected type to the desired specifications.
ImportantIf you need to run multiple scaling plans on the same day, we recommend scheduling their scale-out times at least 1 hour apart.
Restoration Time
The time the scaling operation ends. At this time, the system restores the resources to their pre-scaling specifications.
Scaled Resources
Select the resource specifications to scale out. Depending on the Scaling Type, the meaning of Scaled Resources varies:
If you select Scaling for Computing Resources, Scaled Resources specifies the compute resources to add to the cluster's existing resources. For example, if the cluster's compute resources are 32 cores/128 GB and you set Scaled Resources to 16 cores/64 GB, the system scales out the compute resources to 48 cores/192 GB.
If you select Default Proportional Scaling for Computing Resources and EIUs, Scaled Resources specifies the compute resources to add to the cluster's existing resources. The system scales up the elastic I/O resources proportionally. For example, if the cluster's compute resources are 32 cores/128 GB, its elastic I/O resources are 8 cores/64 GB, and you set Scaled Resources to 32 cores/128 GB, the compute resources are scaled out to 64 cores/256 GB (a 2x increase). The elastic I/O resources are also scaled up by a factor of 2, resulting in 16 cores/128 GB.
ImportantThe system triggers scaling of elastic I/O resources only when you scale out compute resources to at least 1.5 times their current specifications. For example, if you scale compute resources from 32 cores/128 GB to 48 cores/192 GB, the system scales up the elastic I/O resources proportionally.
If you select Scaling for EIUs, Scaled Resources specifies the target specifications for the elastic I/O resources. For example, if the cluster's current elastic I/O resources are 8 cores/64 GB and you set Scaled Resources to 16 cores/128 GB, the system scales up the elastic I/O resources to 16 cores/128 GB.
Scaling Cycle
Select the recurrence schedule for the plan.
Support Monday to Sunday each week, and the 1st to 31st of each month.
Enabled
Specifies whether to enable the scaling plan. The plan is enabled by default.
Click OK.
Configure alerts for scaling plan failures and delays
If resources are insufficient or an internal error occurs, a scaling plan may be delayed or may fail. In this case, you can log on to the CloudMonitor console to configure alert rules for the Instance:SystemMaintenance.Elastic:Delay and Instance:SystemMaintenance.Elastic:Failed events. This helps you receive alert notifications and resolve issues promptly. For detailed instructions, see Manage event subscriptions (Recommended).
FAQ
Effective time of a resource scaling plan
The system prepares resources in advance to ensure they scale to the desired specifications at the scheduled time. Therefore, a resource scaling plan does not take effect immediately after creation or modification. The time until a plan becomes effective varies by cluster edition.
Enterprise Edition and Basic Edition
A new or modified resource scaling plan takes 1 hour to take effect.
For example, a resource scaling plan is configured with the following settings:
Effective Date: 2024-09-18
Expiration Date: 2024-09-25
Scaling Time (Cluster-specific): 10:15:00
Scaling Cycle: Every Wednesday
If you create the resource scaling plan at 09:00:00 on September 18, 2024 (Wednesday), the plan takes effect at 10:00:00 on the same day. The first scaling operation runs at 10:15:00. The Next Effective Time (Cluster-specific) displayed in the AnalyticDB for MySQL console is 2024-09-18 10:15:00.
If you create the resource scaling plan at 10:00:00 on September 18, 2024 (Wednesday), the plan takes effect at 11:00:00. By the time the plan is effective, the scheduled scaling time of 10:15:00 has already passed. Therefore, the first scaling operation will run on the next scheduled day, which is at 10:15:00 on September 25, 2024 (Wednesday). The Next Effective Time (Cluster-specific) displayed in the AnalyticDB for MySQL console is 2024-09-25 10:15:00.
Data Lakehouse Edition
The effective time varies by the type of resource scaling plan.
If no Default Proportional Scaling for EIUs plan is enabled, a new or modified plan for an Interactive Resource Group takes 10 minutes to become effective.
If a Default Proportional Scaling for EIUs plan is enabled, a new or modified plan for an Interactive Resource Group takes 1 hour to become effective.
A new or modified EIU plan takes 1 hour to become effective.
A Default Proportional Scaling for EIUs plan takes effect only if a resource scaling plan for an Interactive Resource Group is also enabled.
For example, a resource scaling plan for an Interactive Resource Group is configured with the following settings:
Effective Date: 2024-09-18
Expiration Date: 2024-09-25
Scaling Time (Cluster-specific): 10:15:00
Scaling Cycle: Every Wednesday
If a Default Proportional Scaling for EIUs plan is enabled: If you create the plan for the Interactive Resource Group at 10:00:00 on September 18, 2024 (Wednesday), it takes effect at 11:00:00. By then, the scheduled scaling time of 10:15:00 has passed. Therefore, the first scaling operation will run at 10:15:00 on the next scheduled day, September 25, 2024 (Wednesday). The Next Effective Time (Cluster-specific) displayed in the AnalyticDB for MySQL console is 2024-09-25 10:15:00.
If no Default Proportional Scaling for EIUs plan is enabled: If you create the plan for the Interactive Resource Group at 10:00:00 on September 18, 2024 (Wednesday), it takes effect at 10:10:00. The first scaling operation runs at 10:15:00 on the same day. The Next Effective Time (Cluster-specific) displayed in the AnalyticDB for MySQL console is 2024-09-18 10:15:00.
Data Warehouse Edition
The following table describes the effective times for resource scaling plans.
Creation or modification time | Effective time | Example |
00:00:00 to 23:00:00 | The plan takes effect at 00:00:00 on the next day and runs its first operation at the specified time. | The creation time is 18:00:00 on September 24, 2024 (Tuesday). The plan is configured as follows:
Effective time: The plan takes effect at 00:00:00 on September 25, 2024 (Wednesday) and runs the first scale-out operation at 02:00:00 on the same day. |
23:00:00 to 23:59:00 | The plan takes effect at 00:00:00 two days later and runs its first operation at the specified time. | The creation time is 23:30:00 on September 24, 2024 (Tuesday). The plan is configured as follows:
Effective time: The plan takes effect at 00:00:00 on September 26, 2024 (Thursday) and runs the first scale-out operation at 02:00:00 on October 02, 2024 (Wednesday). |
Enterprise Edition, Basic Edition, and Data Lakehouse Edition clusters: Scheduling scale-out and scale-in
For Enterprise Edition, Basic Edition, and Data Lakehouse Edition clusters, a single resource scaling plan cannot schedule both scale-out and scale-in operations. To schedule both, you must create two separate resource scaling plans.
For example, to accommodate high query volumes during the day and low volumes at night, you can scale out resources at 06:00 and scale them in at 22:00 daily. This requires two separate resource scaling plans, as shown in the following examples.
Enterprise Edition
Type | Parameter |
Scale-out resource scaling plan | Desired Specifications per Reserved Resource Set: 36 ACU Scaling Time (Cluster-specific): 06:00:00 |
Scale-in resource scaling plan | Desired Specifications per Reserved Resource Set: 24 ACU Scaling Cycle: Daily Scaling Time (Cluster-specific): 22:00:00 |
Basic Edition
Type | Parameter |
Scale-out resource scaling plan | Desired Specifications per Reserved Resource Set: 12 ACU Scaling Cycle: Daily Scaling Time (Cluster-specific): 06:00:00 |
Scale-in resource scaling plan | Desired Specifications per Reserved Resource Set: 8 ACU Scaling Cycle: Daily Scaling Time (Cluster-specific): 22:00:00 |
Data Lakehouse Edition
Type | Parameter |
Scale-out resource scaling plan | Scaling Type: Interactive Resource Group Desired Specifications: 32 ACU Scaling Cycle: Daily Scaling Time (Cluster-specific): 06:00:00 |
Scale-in resource scaling plan | Scaling Type: Interactive Resource Group Desired Specifications: 16 ACU Scaling Cycle: Daily Scaling Time (Cluster-specific): 22:00:00 |
APIs
Edition | API |
Enterprise Edition, Basic Edition, and Data Lakehouse Edition | |
Data Warehouse Edition |