简体   繁体   中英

Does Lambda Service run all the time on a compute to spin up further Execution Environments that eventually run functions?

I understand that Lambda is serverless and it will create an Execution Environment (MicroVMs) on event invocations.

So, when an event is invoked, Lambda will spin up an execution environment that will have selected programming language runtime inside it.

So far, it is clear that these Execution Environments (MicroVMs) are created on demand, and terminated if found idle for long.

Now, original question comes.

My understanding is that, Lambda have a Runtime API. So, whenever we create a Lambda resource in AWS, it can be accessed by Lambda Runtime API. And these API end-points are invoked by Event Sources such as SQS, SNS, etc.

My question is that, is there any compute that run all the time, just to host these Lambda Runtime APIs. And if it is there, why there is not much detail about that, and why are not we charged for that?

Please correct my understanding here.

In a very simplified explanation, Lambda should be considered as a service with two components:

  1. Data Plane: EC2 instances where the functions are executed.
  2. Control Plane: Service that contains all the metadata related to each Lambda deployed, including event mapping.

When an event occurs, it will be processed by the control plane. The control plane will validate the security and check if there is an available copy of the function already instantiated.

If one is available, it will forward the event to the Lambda and pass instructions to send back the result. If there is no function available the control plane will download the function code, together with its runtime, instantiate a new function in the data plane and forward the event.

At all times, there will be control plane and data plane machines online. The AWS Lambda service will increase or decrease the number of each based on usage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM