Home > Software engineering >  Do multiple functions deployed in same Azure function app share a cold start?
Do multiple functions deployed in same Azure function app share a cold start?

Time:11-19

I have created two Azure functions using C#/.Net Core 3.1 and deployed them as Function App. After adding Scale controller log, I have observed that both functions have only one Cold start which is the "function host initialization".

My hypothesis is that behind the scenes, Azure deployed two "functions" in the same container, which explains both either has a cold start or do not have all. This is different from AWS lambda functions which have been deployed separately which results in that each Lambda has its own cold starts.

I am not sure if my understanding is correct or not since I can't find any documentation about the internals and how it works behind the scene for the Function app.

Does anyone know this and can confirm or put the right direction?

CodePudding user response:

In the docs where MS explain about the new V3 isolated mode you can see this:

Azure Functions has only supported a tightly integrated mode for .NET functions, which run as a class library in the same process as the host. This mode provides deep integration between the host process and the functions. For example, .NET class library functions can share binding APIs and types.

So all your functions share an underlying process. Hence the functionality your seeing. If you want your functions to be isolated, this is now supported in v3 function apps.

Reference

  • Related