Azure / Azure/azure-functions-host
First EventGrid delivery fails due to cold-start race in Flex Consumption
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
#### What problem would the feature you're requesting solve? Please describe.
During host startup, there's a brief window where HTTP traffic is accepted but the eventgrid_extension system key hasn't load from storage yet. Requests in that window get rejected. Retries succeed once the key is loaded. VNet integration adds additional latency to cold starts, which widens this window.
#### Describe the solution you'd like
The solution should wait until the system key was loaded and not showing failures within EventGrid monitoring. **But even more important for me is that this behavior is documented.**
#### Describe alternatives you've considered
With "Always Ready" instances the problem was solved. Switching to managed-identity delivery on the Event Grid subscription would solve the problem as well, because it removes the system key dependency entirely.
#### Additional context
Having this feature in place or the limitation at least documented would help Azure user. For example for a solution, which reacts to an event, which occurs only several times a year scaling down to zero and not using Always Ready would be nice.
Contributor guide
Research direction
Start with the Azure Functions host startup path and the eventgrid_extension system-key loading flow; review how EventGrid monitoring reports first-request failures. Compare the Always Ready and managed-identity alternatives, then determine whether the outcome is a startup behavior change or documentation of the limitation. Done should include a defined resolution and coverage of the cold-start scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100