'WarmUp function in production slot after deployment
I'm trying to understand how deployment slots work.
Let’s say I have an Azure Function with one slot (production slot). This Azure Function contains multiple activity functions.
Now, I’m going to add a new staging slot and deploy these functions to staging slot:
What I notice is that, after deployment to staging slot, I see all the functions in staging slot and only ‘Warmup function’ in production slot.
After a few minutes, I see all the functions back in production slot.
Does this mean, during each deployment to staging slot, Warmup function is added to production slot for some time and this would cause downtime in production? Please let me know.
Solution 1:[1]
Does this mean, during each deployment to staging slot, Warmup function is added to production slot for some time and this would cause downtime in production? Please let me know.
AFAIK, Yes! For every instance, the swap operation waits to complete the restart in the source slot for getting available to requests.
If all instances on the source slot are warmed up successfully, the two slots complete the swap by switching routing rules. After this step, the target slot (for example, the production slot) has the app that's previously warmed up in the source slot. - This is called Routing Update in Swapping Operation.
After swapping of slots, the app may get unexpected restarts because the hostname binding configuration goes out of sync, in which by itself doesn't cause restarts.
Of course, doing a swap will have downtime using slots because it is not just deployment of code that adds downtime -- infrastructure deployment, especially app-settings does it as well.
Refer to the worked solution of minimizing the downtime using deployment setting variable in azure functions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |