[Documentation] Graceful shutdown best practices documentation request
- Dominant language
- PowerShell
- Stars
- 1.1k
- Forks
- 215
- Avg merge
- 4h 2m
- Merged PRs (30d)
- 1
Description
Hi,
I am looking for best practices on handling gracefully scale downs/shutdowns. I am also looking for Function App code deployment organization recommendations to help minimizing impact on shutdown scenarios.
While I found information here and there, scattered around in Github repos and docs.com, I was not able to find a nice summary or reference/guide on the subject that provide best practices.
Some questions to understand what I am looking for :
1. What happen when a scale down occurs and a Function is currently executing on the node being stopped because of scaledown? Is the [cancellation token](https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library#cancellation-tokens) still approach applicable?
2. Is the scale controller aware of currently executing Functions to prevent tear down of currently executing Function?
3. What happen when stopping an Azure Function app while a function is executing? How can I know this is happening, using the [cancellation token](https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library#cancellation-tokens) approach? Is it the same behavior when upgrading the Functions runtime?
4. What is the behavior of Azure Functions when reaching the execution timeout? [Reference](https://github.com/Azure/azure-functions-host/issues/2153). Is the [Cancellation Token approach](https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-class-library#cancellation-tokens) still applicable for execution timeout?
Thanks!
Related issue: https://github.com/Azure/Azure-Functions/issues/862
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.