Why are Azure features taking too long to wake up?

We have a simple Azure function that makes a DocumentDB request. It seems that the first time we call it, there is a long wait until the end, and then consecutive calls are very quick.

For example, I just opened our application, and the first function call took 10760ms, which is clearly noticeable to any end user. After that, all function calls take approximately 100 ms to process and are almost invisible.

There seems to be some kind of wake-up cycle in Azure Functions. Is there a way to minimize this, or is it even better documented somewhere so that we can understand what is really going on here?

+4
source share
1 answer

Applications that work in terms of consumption, really have a simple, after which they effectively go into sleep mode. The next challenge is to “wake them up,” as you noticed, and people mentioned in the comments.

As far as this is concerned, Microsoft can best distribute computing workloads in a multi-tenant environment, ensuring that you only bill for the second time that your function really works. This is beauty without a server.

, , . , , , "keep alive", , .

+4

Source: https://habr.com/ru/post/1682804/


All Articles