When Does Cold Start Happen on Azure Functions?
The first cold start happens when the very first request comes in after deployment.
After that request is processed, the instance stays alive for the time being to be reused for subsequent requests. But for how long?
The following chart answers this question. It plots the response duration in seconds (Y-axis) by the interval since the previous requests (X-axis). Each point represents a single request in the data set. Blue points are cold starts and red points are responses from warm instances:
An idle instance lives not londer 22 minutes and then gets recycled. Some cold starts happen earlier than 20 minutes, so this behavior seems less deterministic than it used to be in the past.
Here is a formal visualization of the same data. It plots the probability of a cold start (Y-axis) by the interval between two subsequent requests (X-axis):
Go back to Cold Starts in Azure Functions.