Expanding Capacity Manually

Last updated: 2024-01-17 17:57:35

Auto Scaling (Auto Scaling, AS) not only supports automatic expansion and contraction based on business load, but also allows for your manual intervention, achieving rapid manual scaling effects. You can achieve expansion effects through the following two methods:

Incorporate existing CVM instances into the scaling group.

The scaling group provides you with a method to add existing instances to the current scaling group, enabling the ability to observe load and manage in conjunction with the other machines in the scaling group.

Preparations

The instance is in operation.
The instance and the scaling group are located in the same region.
The network attributes of the instance must align with the scaling group, meaning they either both belong to the basic network or to the same private network.

Notes

AS will add the required capacity of the group to the number of instances to be added. For instance, if your current desired instance count is 5, after manually adding 3 instances, your desired instance count will become 5 + 3 = 8. If the number of instances to be added plus the required capacity exceeds the maximum instance count of the scaling group, the request will fail.
If the scaling group is associated with one or more Cloud Load Balancers (CLB), any manually added instances will automatically register with all the CLBs in the scaling group.
During the scaling down process, the scaling group will first remove the automatically created machines. Only when there are no automatically created machines left, will it opt to remove the manually added machines.
When the scaling group removes a manually added instance, it merely disassociates the instance from the scaling group and the CLB. This action ensures that the instance is no longer managed by the scaling group, but it does not terminate your instance.

Manually Adding Instances Using the Console

1. Log in to the Scaling Group Console and click on the ID of the scaling group to which you want to add instances.
2. Navigate to the details page of the scaling group, select Associated Instances > Add Instance. As shown in the image below:

3. In the dialog box, select the corresponding instances and click Confirm. As depicted in the image below:


Modify the desired instance count to achieve one-click scaling.

Scaling Scenarios

If your requirements align with the following scenarios, you can execute one-click scaling via the console. Ensure to complete tasks such as CLB forwarding rules, machine configuration, and business deployment in advance. Even if your business needs to scale up later, you only need to modify the parameters of the scaling group with one click to quickly complete the scaling.
The peaks and troughs of business are difficult to predict, yet there is a reluctance to leave scaling entirely to the system's discretion. If the business peaks and troughs are predictable, please refer to Managing Scheduled Tasks for more details.
Your computational requirements are project-based, and the machines used each time are similar. This is applicable to scenarios such as social sentiment collection, gene sequencing, weather forecasting, etc.

Perform one-click scaling via the console.

Execute the following steps to set the CVM template as the launch configuration and configure the corresponding scaling group.
1. Create a custom image, for more details, please refer to Detailed Method for Creating Custom Images.
Note:
Subsequent scaling instances will be deployed based on this image environment.
Recommended approach for creating a custom image: You may choose an existing CVM or create a new one, deploy your business on it, and set the business to start with the operating system, then export it as a custom image.
2. Create a launch configuration based on this custom image, for more details, please refer to Creating a Launch Configuration.
3. Create a Scaling Group. When creating, select the previously created launch configuration. The minimum scaling number, maximum scaling number, and initial instance number should be filled in according to the lower limit, upper limit, and current number of servers you need.
4. Upon completion of the above steps, when your business needs to scale (for instance, initiating a gene sequencing task or activating a request-type machine to collect data), you can modify the scaling group configuration, increase the minimum scaling number, maximum scaling number, and desired instance number. AS will swiftly accomplish the scaling.