Azure / Azure/azure-functions-host
Scale Unit Replacement Causes Outage
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### What problem would the feature you're requesting solve? Please describe.
Azure functions V1, App Service Plan
When a scale unit is replaced downtime is incurred because the new scale unit is deemed to be immediately available. In reality the new scale unit takes over 10 minutes to become settled and stable and ready for traffic.
This results in excessively slow response times (minutes instead of milliseconds) during the warmup phase of the new instance.
Clearly visible (below) is 11:29 to 11:40 - CPU maxed out on new scale-unit, meanwhile old scale-unit is immediately disposed of.
ADDITIONALLY - This long-leading edge causes Scale-Out side-effects like - #4294
#### Describe the solution you'd like
The old scale-unit should continue to accept traffic for 15 mins whilst the new scale-unit.
Only after the new scale-unit is settled is traffic accepted.
#### Describe alternatives you've considered
If we can read server up-time or CPU utilization we can return a 503 - Service Unavailable.
When up-time less than 15 mins - return 503 - Service Unavailable
Possible host.json setting
#### Additional context
Chart of CPU by instance during switch-on of new scale-unit

Contributor guide
Assessment
This issue has not been assessed yet.