You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Microservices applications
AutoScaling
Copy page
Download PDF
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.​
  • Calculation rules​
  • 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.​
  • Example​
  • 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​
A microservices app has been released. For detailed steps, see Releasing functions.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation pane, select the region where your business is located.​
  1. In the function list, find the target function and click its name.​
  1. Switch to the Resource management tab. The Autoscaler policy list contains a default monitoring metric policy, which you can edit as needed.​
  1. Click Edit to update the policy.​
  • ​
    Parameter​
    Description​
    Policy type​
    Monitoring metric policy​
    Trigger condition​
    Configure a trigger condition for the monitoring metric policy. The following metric policies are supported. Configure at least one monitoring metric. The relationship between metrics is OR, which means any condition will trigger scaling.​
    • CPU usage: Uses the average CPU usage of all application instances within 15 seconds as the monitoring metric.​
    • MEM usage: Uses the average memory usage of all application instances within 15 seconds as the monitoring metric.​
    tip​
    Only one monitoring metric policy can be configured. Each metric supports only one trigger condition.​
    Configuration preview​
    • Scaling threshold: The scale-in and scale-out thresholds based on the specified target value.​
    • Instance count range: The minimum and maximum instance counts configured for the current microservices app.​
    Autoscaling will not exceed these instance count limits. To adjust the instance count range, go to Resource management > Maximum resource > Instance count range.​
    ​
  1. 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