Azure / Azure/azure-functions-host

Scale Unit Replacement Causes Outage

Open
#5,599 3 comments 0 reactions 1 assignee Claimed by @mhoeger View on GitHub
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
![image](https://user-images.githubusercontent.com/696011/73844050-b5d05b00-4817-11ea-84ff-8b89585ec256.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.