Function Scaling

There are several ways the how Fleet will scale its functions differently from other serverless functions.

The first time your function receives a request, Fleet Function will create a new Fleet isolate to safely execute your Node.js function, when a new request arrives for your function Fleet will check if there is any function being processed, if any, will send that request to your function respecting the Asynchronous limit. When the function is no longer able to handle more requests, Fleet will create a new Fleet Isolate to perform its Node.js function.

Concurrency

The concurrency of its functions is the number of instances that meet requests at a given time, there is no configuration to change this limit, the limits are defined according to the availability of the region at the time and are defined dynamically to meet the maximum number of requests.

The concurrency of a function is triggered when a function is no longer able to handle the request according to the Asynchronous limits.

Asynchronous Threshold

Asynchronous is the limit that an instance of a function can handle more than one request at a time without triggering concurrency, exemplifying: it takes advantage of the function's instance loop event to handle more than one request at a time. Unlike concurrency, this is configurable and there is no max limit defined, but the higher this number is, the more it can affect the processing performance of your function depending on your application.

In functions that only communicate with other functions to make small calculations and save information in the database, the high limits of concurrency can serve well and improve the number of requests that your function can receive. When a function requires more processing, it may be better to keep this limit low and enjoy concurrency.

An asynchronous limit of 10 requests at a time only in a function when reached triggers concurrency, but if it does not reach this peak at the moment, its function can meet many more requests than this limit during the execution time of its function.

Asynchronous is a great case for reusing connections to databases that have low connection limits at a time.