-
Notifications
You must be signed in to change notification settings - Fork 211
Description
Question
I'm seeking clarification on the behavior of in-flight function executions during a deployment slot swap for Azure Function Apps.
The current documentation states:
"Traffic redirection is seamless; no requests are dropped because of a swap. This seamless behavior occurs because the next function trigger is routed to the swapped slot." Then says right after "Currently executing functions are terminated during the swap."
Source: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-slots
These two statements appear contradictory:
- "No requests are dropped" suggests in-flight requests complete
- "Currently executing functions are terminated" suggests they are killed
Specific Questions
-
HTTP Triggers: If an HTTP-triggered function is mid-execution when a slot swap occurs, does the request complete on the original slot (since it has an established TCP connection), or is it terminated?
-
Timer/Queue/Service Bus Triggers: Do background triggers behave differently from HTTP triggers during a swap, since they don't have a client connection holding them open?
-
Clarification on "terminated": Does "currently executing functions are terminated" refer to:
- All running functions regardless of trigger type?
- Only background triggers (timer, queue, etc.) but not HTTP triggers with open connections?
Why This Matters
Understanding this behavior is critical for:
- Designing retry logic
- Determining if we need connection draining strategies
- Making architectural decisions about long-running HTTP operations