By Shantanu Kaushik
In Part 2, we discussed how Auto Scaling performs the scaling in and scaling out functions. Then, we discussed the benefits and features of Auto Scaling. This article discusses Elastic Recovery with Auto Scaling, the Auto Scaling Workflow, and scaling modes.
Alibaba Cloud Auto Scaling has a health check feature that monitors the health status of ECS instances in a scaling group. This helps Auto Scaling ensure that the number of healthy ECS instances in the scaling group does not fall below the minimum specified value.
Alibaba Cloud Auto Scaling releases the unhealthy ECS instances automatically and creates the new ones within the backend Server Load Balancer instances and the whitelists of the ApsaraDB RDS instances.
The Alibaba Cloud Auto Scaling workflow architecture enables the addition of ECS instances after the scaling configuration, scaling rules, and scaling triggers are created within the system.
The step-by-step Alibaba Cloud Auto Scaling workflow is listed below:
1. Scaling rules are executed based on the scheduled task triggers:
a. CloudMonitor provides real-time monitoring to collect metrics related to the performance of ECS instances in the scaling group.
b. Auto Scaling triggers the request for executing a scaling rule. These scaling rules are based on the configured alarm rules, such as when the average CPU usage of all ECS instances in the scaling group exceeds 80%.
c. These task triggers execute scaling rules that can also be pre-defined custom rules or the default rules of the Auto Scaling service.
d. Regular health check tasks are conducted to check the health status of the scaling group and its ECS instances.
e. If an ECS instance is unhealthy and unfunctional, a task is triggered to request the removal of that ECS instance from the group.
2. An Alibaba Cloud Resource Identifier (ARI) executes the scaling activity by implementing the ExecuteScalingRule interface.
3. Alibaba Cloud Resource Identifier (ARI) extends the scaling rules to the system to create the scaling activity by obtaining information about the scaling rule, scaling group, and scaling configuration:
a. The scaling rule ARI queries the scaling rule and scaling group. ARI also computes the number of ECS instances to be added and configures the Server Load Balancer (SLB) and RDS instances.
b. Correct parameters, such as CPU, memory, and bandwidth, are determined by the system after querying the scaling configuration of the scaling group when creating new ECS instances.
c. The scaling activity is created by the system based on:
i. The number of ECS instances to be added
ii. The ECS instance configuration
iii. The Server Load Balancer and RDS instance configurations.
4. During the scaling activity, the system creates the required ECS instances and configures the Server Load Balancer (SLB) and RDS instances:
a. The system creates the specified number of ECS instances based on the ECS instance configuration.
b. The system adds the Intranet IP addresses of the created ECS instances to the whitelist of the specified RDS instance. Then, these newly created ECS instances are added to the specified Server Load Balancer (SLB) instance.
5. As the scaling activity is completed, the system automatically triggers and starts the cool-down function for the scaling group.
6. Before the scaling group can execute any new scaling activity, the cool-down time must be elapsed, enabling the continuity and management of scaling groups.
Alibaba Cloud Auto Scaling supports multiple scaling modes. We discussed three scaling modes in Part 2. Here, we will take a broader look and define all the Auto Scaling scaling modes.
If you configure your system to scale in or scale out at a specific time of day, such as 08:00 PM to 01:00 AM, this is an example of scheduled scaling. You can also define the parameters of scaling to anticipate different network conditions. However, Auto Scaling will automatically scale in and out based on the server load. This mode helps you scale in and out at a scheduled time.
For example, you can set a configuration to scale in and out from 08:00 PM to 01:00 AM on Wednesdays, with a set amount of ECS instances at 50% CPU usage. Auto Scaling will scale in and out but not drop the number of ECS instances if the CPU usage stays on or above 50%.
Alibaba Cloud Auto Scaling dynamically scales up and down by tracking metrics with CloudMonitor to set a target value. The scaling policy adds or removes the ECS instances when necessary to maintain the usage at a specified target value.
You can configure and setup the MinSize parameter using this mode to maintain the minimum number of healthy running instances in the scaling group. If an instance is malfunctioning or not working, the health check mode is activated.
This mode uses an API to scale manually based on metrics from your monitoring system. Alternatively, you can use the CloudMonitor API to track metrics using a third-party console.
This mode allows you to manually run the scaling policy to add or remove ECS instances.
This mode allows you to adjust the number of ECS instances automatically. You can define an upper and lower scaling limit by defining the MinSize and MaxSize for your setup.
This mode enables you to release instances with issues automatically. If the running status of any ECS instance is running something other than the policies you specified, it will be marked for deletion and new ECS instances will be created and added.
This mode allows you to combine multiple scaling modes. This is useful when your application demands are erratic and hard to predict.
In Part 4 of this 4-part series, we will discuss usage scenarios associated with the Alibaba Cloud Auto Scaling and conclude the series.
2,599 posts | 762 followers
FollowAlibaba Clouder - April 8, 2021
Alibaba Clouder - April 8, 2021
Alibaba Clouder - April 9, 2021
Alibaba Clouder - April 6, 2021
Alibaba Clouder - April 2, 2021
Alibaba Clouder - April 7, 2021
2,599 posts | 762 followers
FollowAuto Scaling automatically adjusts computing resources based on your business cycle
Learn MoreAPI Gateway provides you with high-performance and high-availability API hosting services to deploy and release your APIs on Alibaba Cloud products.
Learn MoreAn on-demand database hosting service for SQL Server with automated monitoring, backup and disaster recovery capabilities
Learn MoreOpenAPI Explorer allows you to call an API through its web interface or WebCLI, and view the entire process.
Learn MoreMore Posts by Alibaba Clouder