- Documentation
Volcano Engine Function as a Service
User guide
Functions
Function management
Microservices applications
AutoScaling
Microservices applications
AutoScaling
AutoScaling
Microservices apps support custom autoscaling policies. You can select appropriate policies and metrics and set autoscaling target values to balance resource costs with stability based on your business scenario. This topic describes how to configure autoscaling policies for microservices apps.
tip
For event functions, web applications, and tasks that trigger CPU allocation only when processing requests, veFaaS performs autoscaling based on metrics such as request QPS and resource utilization. Custom autoscaling policies are not applied to them.
Background information
Microservices apps automatically scale based on the trigger condition configured in the monitoring metric policies to maintain resource utilization around the target value.
- Target application instance count = ceil [current instance count × (Current metric value / Target metric value)]. In this formula, ceil means rounding up to the nearest integer.
- To ensure stability and prevent oscillation, no scaling is performed if the calculated ratio falls within the range of 0.9 to 1.1.
- Consider an example scenario where the target CPU utilization value is 50%, and the current instance count is 10.
- When the current utilization is 70%, the calculated target instance count is 14 (ceil[10*(70%/50%)]), and therefore, 4 instances are added.
- When the current utilization is 30%, the calculated target instance count is 6 (ceil[10*(30%/50%)]), and therefore, 4 instances are removed.
- When the current utilization is 55%, the calculated target instance count is 11 (ceil[10*(55%/50%)]), and the scaling ratio is 1.1 (11/10). To prevent oscillation, no scale-out is performed.
- When the current utilization is 45%, the calculated target instance count is 9 (ceil(10*(45%/50%))), and the scaling ratio is 0.9 (9/10). To prevent oscillation, no scale-in is performed.
Prerequisites
Procedure
- In the top navigation pane, select the region where your business is located.
- In the function list, find the target function and click its name.
- Switch to the Resource management tab. The Autoscaler policy list contains a default monitoring metric policy, which you can edit as needed.
- Click Edit to update the policy.
- After the update is complete, click Save.
- You can go to Monitoring > Function Instances to check whether scaling meets expectations.
warning
The autoscaling policy configuration is modifiable, regardless of the current application status. However, the modifications to the policy will take effect only when the application is enabled.
Last updated: 2026.08.19 14:06:05