Skip to content

Commit 84adcad

Browse files
committed
docs(srv): add content reference on autoscaling MTA-5516
1 parent a79154c commit 84adcad

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
meta:
3+
title: Functions autoscaling reference
4+
description: Understand how autoscaling works for Serverless Functions in Scaleway.
5+
content:
6+
h1: Functions autoscaling reference
7+
paragraph: Understand how autoscaling works for Serverless Functions in Scaleway.
8+
tags: serverless functions autoscaling scale up down min max
9+
dates:
10+
validation: 2025-02-18
11+
posted: 2025-02-18
12+
categories:
13+
- serverless
14+
- functions
15+
---
16+
17+
## Benefits of autoscaling
18+
19+
## Minimum and maximum scales
20+
21+
### Minimum scale (min-scale)
22+
23+
The this parameter sets the lowest value your resource is allowed to scale down to:
24+
25+
- If you set a value of `0`, all instances of your resource will be terminated after 15 minutes of inactivity.
26+
27+
- If you set a value of `1` or more, the corresponding number of instances of your resource will remain available at all time.
28+
29+
Customizing the minimum scale for Serverless can help ensure that an instance remains pre-allocated and ready to handle requests, reducing delays associated with [cold starts](/serverless-functions/concepts/#cold-start). However, this setting also impacts the costs of your Serverless Function.
30+
31+
### Maximum scale (max-scale)
32+
33+
This parameter sets the maximum number of instances of your resource. You should adjust it based on your function’s traffic spikes, keeping in mind that you may wish to limit the max scale to manage costs effectively.
34+
35+
### Autoscaler behavior
36+
37+
The autoscaler decides to start new instances when:
38+
39+
- the existing instances are no longer able to handle the load because they are busy responding to other ongoing requests. By default, this happens if an instance is already processing 80 requests (max_concurrency = 80).
40+
41+
- our system detects an unusual number of requests. In this case, some instances may be started in anticipation to avoid a potential cold start.
42+
43+
The same autoscaler decides to remove instances when:
44+
45+
- no more requests are being processed. If even a single request is being processed (or detected as being processed), then the autoscaler will not be able to remove this instance. The system also prioritizes instances with the fewest ongoing requests, or if very few requests are being sent, it tries to select a particular instance to shut down the others, and therefore scale down.
46+
- an instance has not responded to a request for more than 15 minutes of inactivity. The instance is only shut down after this interval, once again to absorb any potential new peaks and thus avoid the cold start. These 15 minutes of inactivity are not configurable.
47+
48+
<Message type="note">
49+
Redeploying your resource results in the termination of existing instances and a return to the min scale, which you observe when redeploying.
50+
</Message>

0 commit comments

Comments
 (0)