DEMO: Manual Scaling Rules
Introduction to Alibaba Auto Scaling
The course is part of this learning path
Alibaba Auto Scaling automatically creates and releases ECS instances based on pre-defined rules in order to scale services to match demand. Furthermore, it can configure server load balancer and relational database service white lists, without any manual intervention.
In this course, you will learn about the Alibaba Auto Scaling service and how it operates. You will learn about the core concepts of the service, scaling groups, scaling configurations, and scaling rules (manual and automatic). For each section of the course, there are guided demonstrations from the Alibaba Cloud platform that you can follow along with, giving you the practical experience necessary to set up auto scaling on your own environment.
If you have any feedback relating to this course, feel free to contact us at email@example.com.
- Understand the core concepts and components of Alibaba Auto Scaling
- Learn how to create, modify, enable, disable, and delete a scaling group
- Learn how to create, modify and delete the scaling configuration that provides the virtual servers in the scaling group
- Understand the different types of scaling rules that are available
- Learn how to use manual and automatic scaling operations
This course is intended for anyone who wants to learn how to set up auto scaling in their Alibaba Cloud environments.
To get the most out of this course, you should already have a basic knowledge of Alibaba Cloud or another cloud vendor.
Welcome to this demonstration on manual scaling rules. So from the previous demonstration that I did, we have a scaling group and an active scaling configuration, and currently, our instances stand at two total ECS instances in service. What we're gonna look at now is creating some manual scaling rules.
So I'm gonna come up to the Scaling Rules tab, click on Create Scaling Rule, and I have the options of the different rule types. There's the step scaling rule, target tracking, predictive scaling. I'm just gonna create a simple scaling rule for this demonstration. I need to enter a rule name. So I'm gonna call this the add two instances, for example, and then under the operation, I select whether I want to add or remove instances using this rule. So I've called it the add two instances.
We'll go add, select the count of two, instances. Now my options are instances or a percentage of the count. So we'll leave it instances. I then set a call down time. So I'll just put 120 seconds, for example, so two minutes, and click OK. And that's added a scale-out scaling rule that would add two instances.
Now you'll notice here it's gonna be manually executed. Now it can be allocated to an event trigger task, which we're gonna look at in the next demonstration that I'm going to do. But if I need to make a change to this, I can then either edit it, which would allow me to change the name and then what I want to add or delete. And I can also execute it if I want to run it directly now. So we'll leave that for a second.
I'm gonna go create another scaling rule and the rule name will be remove, remove one instance. And again, I'm gonna make that a simple scaling rule and I'm gonna change to remove one instance. And again, I'll do a call down time of two minutes, and click OK.
So now I have one rule that's gonna scale out to add two, and another rule that we're scaling, which will remove one ECS instance. Now, if I try to run the remove one instance by manually executing it, you'll see it says, "Do what you want to execute the scaling rule?" If I click OK, I get an error.
Now the current minimum count is set to two. And at the moment we have two ECS instances. So effectively this has been rejected. So if I go and click OK, cancel out of that, and I will now execute the add two instances, so I will execute, that says, "Do you want to do that?" Click OK. And that will instantly create a scaling activity.
If we go to the scaling activity, you see we are not executing the scaling activity and you can see the previous that was rejected. I just tried to run and that caused the error. If I go back to basic information, you'll see in here, if I do a refresh, we are now adding one machine and we're gonna end up with a total of four machines. I'll do a refresh. Yeah, we can say it's now adding the second machine. So we'll end up with a total of four machines in service.
I'll wait a few minutes and I'll just fast-forward to when we've got four. And we can see we now have four machines in total in service.
If I come back to the scaling rules and now try to run the remove one instance and execute, click OK, you'll see that that has now created the scaling activity that previously was rejected 'cause I now have more than two instances in the group, so it can remove one. And that'll take me down to three instances in the group.
If I go back to the basic information, again, you can see that my minimum number is two. The maximum number is five. If I do a refresh, we can see we are removing. Yeah, so one has been removed and we now have three machines total in service. And that's how we can create some simple scaling rules.
That concludes this demonstration. In the next session, which will be session seven, we'll look at creating automated tasks. I look forward to seeing you there.
David’s IT career started in 1990, when he took on the role of Database Administrator as a favor for his boss. He redirected his career into the Client Server side of Microsoft with NT4, and then progressed to Active Directory and each subsequent version of Microsoft Client/Server Operating Systems. In 2007 he joined QA as a Technical Trainer, and has delivered training in Server systems from 2003 to 2016 and Client systems from XP onwards. Currently, David is a Principal Technical Learning Specialist (Cloud), and delivers training in Azure Cloud Computing, specializing in Infrastructure Compute and Storage. David also delivers training in Microsoft PowerShell, and is qualified in the Alibaba Cloud Space.