Avoiding cold starts by warming the app at regular intervals

By now, you might be aware of the fact that you can create Azure functions in the following two hosting plans:

You will get all the benefits of serverless architecture only when you create the function app using the consumption plan. However, one of the concerns that developers report about using the consumption plan is something called cold starting, which refers to spinning up an Azure function to serve the requests when there have been no requests for quite some time. You can learn more about this topic at https://blogs.msdn.microsoft.com/appserviceteam/2018/02/07/understanding-serverless-cold-start/.

In this recipe, we will learn a technique that could be used to always keep the instance live and warm so that all requests are served properly.

The App Service plan is a dedicated hosting plan where your instances are reserved for you and they can always be warm even if there are no requests for quite a bit of time.