Create an Auto Scaling Rule in Alibaba Cloud

Create Auto Scaling Rule in Alibaba Cloud
This tutorial focuses on the steps to create an Auto Scaling rule for a Scaling group in Alibaba Cloud.

 

Alibaba Cloud provides a comprehensive set of global cloud computing services to power Alibaba’s eCommerce ecosystem and other online businesses. Since 2009, Alibaba Cloud has been one of the leading providers in Artificial Intelligence (AI) and cloud computing. Alibaba Cloud offers cloud computing resources and services to thousands of government organizations, developers, and enterprises in more than 200 regions.

 

An Auto Scaling group is a group of Elastic Compute Service (ECS) instances that are dynamically scaled based on pre-configured scaling rules. A Scaling group allows users to set the minimum and the maximum number of ECS instances, templates used to create ECS instances automatically, and policies for removing ECS instances. Also, users can use a Scaling group to maintain a group of Elastic Compute Service (ECS) instances based on the user’s business requirements. 

 

Auto Scaling rule type determines the primary purpose of a scaling rule. Users can use the Auto Scaling rule to trigger a scaling activity or set the maximum and minimum numbers of Elastic Compute Service (ECS) instances for a scaling group. In this tutorial, we will learn about the steps to create an Auto Scaling rule for a Scaling group in Alibaba Cloud.

 

Background Information 

Auto Scaling in Alibaba Cloud supports four types of scaling rules, such as: 

  • Simple scaling rule: It is used to trigger a scaling activity to decrease or increase the number of ECS instances in an Auto Scaling group by or to a specific number.
  • Predictive scaling rule: It is used to set the maximum and minimum numbers of Elastic Compute Service (ECS) instances for an Auto Scaling group.
  • Step scaling rule: It is used to trigger a scaling activity. Step scaling rules are similar to simple scaling rules, except that each simple scaling rule defines only one scaling policy.
  • Target tracking scaling rule: It is used to trigger a scaling activity that helps to automatically calculate the number of ECS instances required to keep the metric close to the target value and scales ECS instances accordingly.

 

Users can create only a limited number of scaling rules for a scaling group. The limit is based on the resource usage of the Auto Scaling group.

 

Create a Scaling Rule 

To create a scaling rule in Alibaba Cloud, follow the below steps: 

1. Log in to the Auto Scaling console in Alibaba Cloud as an admin user.

2. Search and find the scaling group and use one of the following methods to open the details page of the scaling group:

  • Click Details in the Actions column, or
  • Click the ID of the Auto Scaling group in the Scaling Group Name/ID column.

3. In the upper part of the Auto Scaling group page, click the Scaling Rules tab.

4. Next, click the Create Scaling Rule button. 

5. In the Create Scaling Rule dialogue box, configure parameters for the scaling rule, such as:

  1.  Mention a name and description for the scaling rule. 
  2.  Select the Auto Scaling rule type and configure the related parameters. 

 

>> Note: Users cannot change the rule type of a scaling rule after creating a scaling rule.

 

6. Finally, click the OK button to create the scaling rule. 

 

Parameters for Different Scaling Rule Types 

Parameters for Simple Scaling Rule

  

ParameterDescription
OperationMention the operations that need to be executed when the scaling rule is triggered. Some of the valid values are:

 

Change to N Instances: When the scaling rule is executed, the number of instances in the scaling group is changed to N. A maximum of 500 instances can be removed or added from an Auto Scaling group at a time.

Add N Instances: When the scaling rule is executed, N instances are added to the Auto Scaling group. Users can add a maximum of 500 instances to a scaling group at a time.

Remove N Instances: When the Auto Scaling rule is executed, N instances are removed from the scaling group. Users can remove a maximum of 500 instances from a scaling group at a time.

Add Instances by N%: When the Auto Scaling rule is executed, N% of the number of existing instances in the scaling group is added. Users can add a maximum of 500 instances to a scaling group at a time.

Remove Instances by N%: When the scaling rule is executed, N% of the number of existing instances in the Auto Scaling group is removed. Users can remove a maximum of 500 instances from a scaling group at a time.

Cooldown Time(Optional) Unit: seconds. The cooldown period. If this parameter is not specified while creating, the cooldown period of the scaling group is used.

 

Parameters for a Predictive Scaling Rule 

>> Note: An Auto Scaling group can have only one predictive scaling rule. 

 

ParameterDescription
Reference Existing Target Tracking Scaling RuleMention whether to refer to an existing target tracking scaling rule. If a target tracking Auto Scaling rule exists in the scaling group, users can use  Target Value and Metric Type values specified in the target tracking scaling rule.
Select a RuleThis parameter will appear if the user has selected Reference Existing Target Tracking Scaling Rule. After selecting a target tracking scaling rule, Target Value and Metric Type values specified in the target tracking scaling rule apply to the predictive scaling rule.
Metric TypeMention the name of a Cloud Monitor metric to be monitored. Some of the valid values are:

l  (ECS) Average Outbound Internal Traffic. Unit: KB/min.

l  (ECS) Average Inbound Internal Traffic. Unit: KB/min.

l  (ECS) Average CPU Utilization. Unit: %.

 

Target ValueMention the target value of the metric that needs to be monitored by Cloud Monitor. The predictive scaling rule calculates an appropriate predicted value based on multiple factors such as the target value.

If the user changes the target value, existing prediction tasks of the current scaling group are cleared. New prediction tasks are created within an hour.

Predicative ModeMention the prediction mode for the Auto Scaling group. The valid values are:

·         Predict Only: It will produce predictions but does not create prediction tasks.

·         Predict and Scale: It will produce predictions and create its tasks.

We recommend users select Predict Only first and change it to Predict and Scale if they confirm that the predictions can meet their requirements.

Preset Max CapacityMention the maximum number of Elastic Compute Service (ECS) instances in the Auto Scaling group. This parameter is used together with the Maximum Capacity Handling Method.

The default value is the maximum number of instances in the current Auto Scaling group.

Maximum Capacity Handling MethodMention the action to be taken on the predicted value when it exceeds the pre-set maximum capacity. The default value is Predicted Capacity Overwrites Preset Max Capacity. Some of the valid values are:

l  Predicted Capacity Overwrites Preset Max Capacity

l  Preset Max Capacity Overwrites Predicted Capacity

l  Predicted Capacity with Additional Ratio

Increase RatioMention the ratio of the increment to the predicted value. This parameter appears when the user set Maximum Capacity Handling Method to Predicted Capacity with Additional Ratio. Valid values: 0 to 100. Default value: 0.
Pre-launch TimeMention the buffer time before prediction tasks are executed. By default, all scheduled tasks created automatically for a predictive scaling rule are executed on the hour. Valid values: 0 to 60. Default value: 0.

 

Parameters for a Step Scaling Rule 

  

ParameterDescription
Monitoring TypeChoose a monitoring type based on the event-triggered task to be associated with the Auto Scaling rule.

·         System Monitoring: Choose this option to associate a system monitoring event-triggered task with the Auto Scaling rule.

·         Custom Monitoring: Choose this option to associate a custom monitoring event-triggered task with the Auto Scaling rule.

Start TimeDefine an event-triggered task to be associated with the Auto Scaling rule as the parameter value. The condition of the event-triggered task is used as the reference for triggering step scaling operations.
OperationSpecify step Auto Scaling operations based on the condition of the event-triggered task.
Instance Warmup TimeUnit: seconds. The instance warmup period. Auto Scaling adds instances in the warm up state to an Auto Scaling group but does not report monitoring data to Cloud Monitor during the warmup period.

 

Parameters for a Target Tracking Scaling Rule 

 

ParameterDescription
Reference Existing Predictive Scaling RuleSpecifies whether to reference an existing target tracking scaling rule. If a predictive scaling rule exists in the scaling group, users can specify whether to inherit the target and metric value from the predictive scaling rule.
Metric TypeMention the name of a Cloud Monitor metric to be monitored. Some of the valid values are:

l  (ECS) Average CPU Utilization

l  (ECS) Average Inbound Public Traffic

l  (ECS) Average Outbound Public Traffic

l  (ECS) Average Inbound Internal Traffic

l  (ECS) Average Outbound Internal Traffic

Target ValueMention the target value of the Cloud Monitor metric. The target tracking Auto Scaling rule keeps the Cloud Monitor metric close to the target value.
Instance Warmup TimeUnit: seconds. The instance warmup period. Auto Scaling adds instances in the warm up state to an Auto Scaling group but does not report monitoring data to Cloud Monitor during the warmup period.
Disable Scale-inSpecifies whether to disable scale-in events as the value in this parameter. This parameter affects the number of event-triggered tasks created automatically.

  

 

Conclusion 

This tutorial presents the steps to create an Auto Scaling rule for a Scaling group in Alibaba Cloud. Hope this tutorial was helpful, and do reach out to us if you have any query or suggestions. 

Share this post

Share on facebook
Share on linkedin
Share on twitter
Share on whatsapp

Services to Explore

Stay up to date!

Stay up to date with the Web Hosting, Cloud and Server Management Industry News and Tutorials!

We will send you only the relevant emails, and we respect your privacy. Please review our privacy policy for more info.

Managed Alibaba Cloud Services

Focus on your business & let us take care of your Alibaba Cloud Infrastructure!
From what you are reading, it seems you are interested in Alibaba Cloud and related technologies. If you have a moment to spare, please take a look at our Managed Alibaba Cloud plan, and which might interest you even more!
Managed Alibaba Cloud

Value-Added Services

We have services that can help you run a successful business. With us, you don't have to worry about these areas because our experts will take care of it for you.

ServerHealers uses cookies.