what is the difference between the serverless function instance and the container instance?

155 Views Asked by At

I'm new to serverless computing, and I have questions about serverless functions concurrency. Some open-source serverless platforms like OpenWhisk OpenFaas deeply function using docker containers. These functions can scale up and scale down based on the invocations rate. Scaling up is achieved by increasing the number of instances. But Here, what is a function instance? Is it another container hosting the requested function? Or just another function handler inside the same container, and if so, when a container is duplicated?

1

There are 1 best solutions below

0
On

TL;DR: In most cases, function instances are the same as container instances.

Longer answer: On most platforms, such as OpenWhisk, each function instance operates within its own container. However, there are exceptions like Nuclio, which allows multiple functions to run within a single container to enhance performance. Nevertheless, it is generally more convenient to have one function instance per container, as it simplifies orchestration with tools like Kubernetes. Therefore, most platforms employ containers to host function instances, making it reasonable to assume their equivalence.