# Scaling Rules

AS supports two types of rules, CPU load and health check. These can be used in combination.

## CPU Load

Based on the average CPU load of the cluster, you can set a target value for what you consider the CPU load should be. AS will help maintain the load around the target value without the need for you to manage the increase or decrease in the number of instances. AS will automatically calculate the required change in the number of instances each time a rule is triggered to achieve the target load value for you.

## Health Check

LB's VServer has an automatic scan to check whether nodes are healthy or not. AS will automatically remove unhealthy nodes based on the scan status, keeping the nodes in the cluster available. For example, if a host is shut down and the health check rule is enabled, this machine will be released by AS. If no other rules (like number, load) are triggered at the same time, AS will not actively add new nodes to the LB, and the current LB is still considered a stable cluster.

# Operating Guide

## Preconditions
1. Completion of the creation of the scaling group
2. Completion of the configuration of the scaling group host

## Setting Scaling Rules
- Click on the scaling group details
  ![img](https://cdn.udelivrs.com/2025/02/fc032e1121539f3ab92aed6641aa132e_1740715573007.png)
- Check whether the host configuration is okay
  ![img](https://cdn.udelivrs.com/2025/02/1fcde146f409b74364698d4c9461cf42_1740715573115.png)
- In the Rules section, you can see two scaling rules: CPU and Health Check
  ![img](https://cdn.udelivrs.com/2025/02/f66ae87bfb0e25f6cf06862e9672ab14_1740715573219.png)
- Here, take the CPU rule as an example:
   - Click the Edit button next to the target value, set the average CPU load value according to your business situation, and select Enable.
     ![img](https://cdn.udelivrs.com/2025/02/4d60a9f9cb25578ef6d567eb2a4e1de3_1740715573240.png)
