AnalyticDB for MySQL allows you to schedule scaling for computing and storage resources by using resource scaling plans. You can create resource scaling plans by calling API operations or in the AnalyticDB for MySQL console. When system loads are overwhelmed, resources are automatically scaled up to ensure business stability. This topic describes how to create a resource scaling plan in the AnalyticDB for MySQL console.
Create a resource scaling plan for Data Lakehouse Edition (V3.0)
Usage notes
You cannot change the configuration of a cluster when you use resource scaling plans. Before you change the configuration of a cluster, you must disable the resource scaling plans for the cluster. After you change the configuration of the cluster, you can re-enable the resource scaling plans for the cluster. For information about how to disable a resource scaling plan, see Manage a resource scaling plan.
You cannot enable an elastic I/O unit (EIU) scaling plan and a Default Proportional Scaling for EIUs scaling plan at the same time.
If no Interactive Resource Group scaling plan is enabled, Default Proportional Scaling for EIUs scaling plans cannot take effect.
When the amount of reserved storage resources is 0 AnalyticDB compute unit (ACU), you can create only Interactive Resource Group scaling plans.
Types of resource scaling plans
AnalyticDB for MySQL Data Lakehouse Edition (V3.0) provides the following types of resource scaling plans:
Interactive Resource Group: Only computing resources are scaled based on the desired specifications that are specified in the scaling plan. This type of resource scaling plans is suitable for scenarios in which computing resources are insufficient.
Default Proportional Scaling for EIUs: When an Interactive Resource Group scaling plan takes effect, storage resources are scaled based on the default proportion. This type of resource scaling plans is suitable for scenarios in which resource requirements fluctuate predictably during peak and off-peak hours.
EIU: Only storage resources are scaled based on the desired specifications that are specified in the scaling plan. This type of resource scaling plans is suitable for scenarios in which storage resources are insufficient. For example, if you want to import large amounts of data every day for business intelligence (BI) report analysis, you can use this type of 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 (V3.0) 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, click the Scaling Plans tab. On the Resource Scaling Plans tab, click Create Plan in the upper-right corner.
In the Create Resource Scaling Plan panel, configure the parameters that are described in the following tables.
Configure the Plan Name, Effective Date, and Expiration Date parameters.
Parameter
Description
Plan Name
The name of the scaling plan. The name must meet the following requirements:
The name is 2 to 30 characters in length.
The name can contain letters, digits, and underscores (_).
Effective Date
The start date of the scaling plan.
Expiration Date
The end date of the scaling plan.
Select a Scaling Type and configure the scaling plan parameters.
Interactive Resource Group scaling plan
Parameter
Description
Scaling Type
The type of the scaling plan. Select Interactive Resource Group.
Resource Group
The interactive resource group that you want to use for the scaling plan.
Each Interactive Resource Group scaling plan must be associated with a resource group. If you release the resource group, the scaling plan is re-associated with the
user_default
resource group.Desired Specifications
The desired specifications.
Scaling Cycle
The days on which you want to execute the scaling plan.
Scaling Time (Cluster-specific)
The time when you want the system to start scaling resources.
ImportantThe interval between the Scaling Time (Cluster-specific) and the current time must be greater than or equal to 10 minutes for an Interactive Resource Group scaling plan.
If a Default Proportional Scaling for EIUs scaling plan exists, the scaling time interval between Interactive Resource Group scaling plans must be greater than or equal to 1 hour.
If no Default Proportional Scaling for EIUs scaling plan exists, the scaling time interval between Interactive Resource Group scaling plans must be greater than or equal to 10 minutes.
Enabled
Specifies whether to enable the scaling plan. By default, the scaling plan is enabled. For more information, see the "Effective rules for a Data Lakehouse Edition (V3.0) scaling plan" table.
EIU scaling plan
Parameter
Description
Scaling Type
The type of the scaling plan. Select EIU.
Desired Specifications per EIU
The desired specifications.
Scaling Cycle
The days on which you want to execute the scaling plan.
Scaling Time (Cluster-specific)
The time when you want the system to start scaling resources.
ImportantThe interval between the Scaling Time (Cluster-specific) and the current time must be greater than or equal to 30 minutes for an EIU scaling plan.
The scaling time interval between EIU scaling plans must be greater than or equal to 1 hour.
Default Proportional Scaling for EIUs
Specifies whether to enable the Default Proportional Scaling for EIUs scaling plan. By default, the scaling plan is disabled.
If you want the Default Proportional Scaling for EIUs scaling plan to take effect, you must create and enable an Interactive Resource Group scaling plan.
Enabled
Specifies whether to enable the scaling plan. By default, the scaling plan is enabled. For more information, see the "Effective rules for a Data Lakehouse Edition (V3.0) scaling plan" table.
Click OK.
Effective rules for a scaling plan
After you create or modify a scaling plan for an AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster, the scaling plan takes effect based on the value of the Scaling Time (Cluster-specific) parameter.
For example, the current time is 10:00:00 on February 15, 2023 (Wednesday), and the following parameters are configured for a scaling plan:
Effective Date: 2023-02-15
Expiration Date: 2023-02-22
Scaling Time (Cluster-specific): 11:00:00
Scaling Cycle: every Wednesday
Effective time: The scaling plan takes effect on February 15, 2023. The cluster is scaled for the first time at 11:00:00 on February 15, 2023 (Wednesday).
Create a resource scaling plan for Data Warehouse Edition (V3.0)
Prerequisites
The cluster is in elastic mode for Cluster Edition.
The cluster has 32 cores and 128 GB memory or more.
If you want to use the Default Proportional Scaling for Computing Resources and EIUs scaling plan, the version of the cluster must be V3.1.3.2 or later.
If you want to use the Scaling for Computing Resources or Scaling for EIUs scaling plan, the version of the cluster must be V3.1.6.1 or later and the cluster must be created in one of Chinese mainland regions on September 1, 2022 or later.
For information about how to query the minor version of a cluster, see How do I query the version of an AnalyticDB for MySQL cluster? To update the minor version of a cluster, contact technical support.
Types of resource scaling plans
In an AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster, you can schedule scaling for computing and storage resources based on a proportion or separately, and then scale the resources back to the original specifications. This allows you to fully utilize resources. AnalyticDB for MySQL Data Warehouse Edition (V3.0) provides the following types of resource scaling plans:
Scaling for Computing Resources: suitable for scenarios in which computing resources are insufficient.
Default Proportional Scaling for Computing Resources and EIUs: suitable for scenarios in which resource requirements fluctuate predictably during peak and off-peak hours.
ImportantScaling of EIUs is triggered only when you scale up computing resources to 1.5 times the current amount of computing resources. For example, when you scale up computing resources from 32 cores and 128 GB memory to 48 cores and 196 GB memory, EIUs are scaled up based on proportion.
Default proportional scaling scales computing resources and EIUs based on the same proportion. For example, your cluster has computing resources of 32 cores and 128 GB memory, and EIUs of 24 cores and 192 GB memory. When you scale up computing resources to 64 cores and 256 GB memory, EIUs are scaled up to 48 cores and 196 GB memory by two times.
Scaling for EIUs: suitable for scenarios in which storage resources are insufficient. For example, if you want to import large amounts of data every day for BI report analysis, you can use this type of 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 Warehouse Edition (V3.0) 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 Resource Scaling Plans tab of the Elastic Resource Scaling page, click Create Plan in the upper-right corner.
In the Create Resource Scaling Plan panel, configure the parameters that are described in the following table.
Scaling plan parameters for Data Warehouse Edition (V3.0) Parameter
Description
Scaling Type
The type of the scaling plan.
ImportantIf you want to use the Default Proportional Scaling for Computing Resources and EIUs scaling plan, the version of the cluster must be V3.1.3.2 or later.
If you want to use the Scaling for Computing Resources or Scaling for EIUs scaling plan, the version of the cluster must be V3.1.6.1 or later and the cluster must be created in one of Chinese mainland regions on September 1, 2022 or later.
Plan Name
The name of the scaling plan. The name must meet the following requirements:
The name is 2 to 30 characters in length.
The name can contain letters, digits, and underscores (_).
Resource Group
The resource group that you want to use for the scaling plan.
Each scaling plan must be associated with a resource group. If you release the resource group, the scaling plan is re-associated with the
USER_DEFAULT
resource group. For more information about resource groups, see Resource group overview and Create a resource group.Effective Date
The start date of the scaling plan.
Expiration Date
The end date of the scaling plan.
Scaling Time
The time when you want the system to start scaling resources. Select the time on the hour.
ImportantIf you want to execute multiple scaling plans on the same day, we recommend that you schedule the scaling plans at an interval of at least 1 hour.
Restoration Time
The time when you want the system to scale the resources back to the original specifications. Select the time on the hour.
Scaled Resources
The specifications of the resources that you want to add, which can be up to eight times the current specifications.
For example, if the cluster has 32 cores and 128 GB memory, you can add up to 256 cores and 1,024 GB memory to the cluster resources. After scaling, the cluster has 288 cores and 1,152 GB memory.
Scaling Cycle
The days on which you want to execute the scaling plan within every week. You must select at least one day.
Enabled
Specifies whether to enable the scaling plan. By default, the scaling plan is enabled. For more information, see the "Effective rules for a Data Warehouse Edition (V3.0) scaling plan" table.
Click OK.
Effective rules for a scaling plan
After you create or modify a scaling plan for an AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster, the system determines the effective time of the plan based on the time when the plan is created or modified. The following table describes the effective rules for a scaling plan.
Creation or modification time | Effective time | Example |
00:00:00 to 23:00:00 | 00:00:00 on the next day. After a scaling plan takes effect, the plan is executed at the specified time. | The creation time of a scaling plan is 18:00:00 on May 25, 2021 (Tuesday). The following parameters are configured for the scaling plan:
Effective time: The scaling plan takes effect at 00:00:00 on May 26, 2021 (Wednesday). The cluster is scaled for the first time at 02:00:00 on May 26, 2021 (Wednesday). |
23:00:00 to 23:59:00 | 00:00:00 on the third day. After a scaling plan takes effect, the plan is executed at the specified time. | The creation time of a scaling plan is 23:30:00 on May 25, 2021 (Tuesday). The following parameters are configured for the scaling plan:
Effective time: The scaling plan takes effect at 00:00:00 on May 27, 2021 (Thursday). The cluster is scaled for the first time at 02:00:00 on June 2, 2021 (Wednesday). |
If resources are insufficient or an internal error occurs, scaling plans may be delayed or fail. In this case, you can log on to the CloudMonitor console and configure alert rules for the Instance:SystemMaintenance.Elastic:Delay and Instance:SystemMaintenance.Elastic:Failed events. This way, when an error occurs, you can receive alert notifications to analyze and identify the causes at the earliest opportunity. For more information, see Configure an event-triggered alert rule.
Related operations
Edition | Operation | Description |
Data Lakehouse Edition (V3.0) | Creates a scaling plan for an AnalyticDB for MySQL Data Lakehouse Edition (V3.0) cluster. | |
Data Warehouse Edition (V3.0) | Creates a scaling plan for an AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster. |