Understanding the execution of a serverless application
So far, we've learned that a serverless application is built in the form of functions that execute based on the occurrence of some event. Also, these functions do not stay alive forever. Instead, these functions are brought into execution as requirements arise. So, how does the provider handle the execution of these functions when a request comes in? Let's take a look.
Cold-starting a function
When the application has been freshly deployed, it is pretty easy to imagine that there will be no instances of the function that will be executing currently. When a newrequest comes in that asks for the functionality provided by the function we have just deployed on the infrastructure. Now, the cloud provider systems are notified that there are no running instances of the function that can handle the incoming request.
Once the provider system is made aware of the situation, it spawns up a new instance with the function code inside it. This instance...