Azure / Azure/Azure-Functions

[Clarification Needed] Do in-flight HTTP requests and running function executions complete during slot swap?

Open
#2,647 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

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:
1. "No requests are dropped" suggests in-flight requests complete
2. "Currently executing functions are terminated" suggests they are killed

## Specific Questions

1. **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?

2. **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?

3. **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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Azure Functions deployment slots documentation at the linked source and verify the behavior of in-flight HTTP, timer, queue, and Service Bus executions during a swap. Done means resolving the apparent contradiction and updating the documentation with clear trigger-specific guidance on completion, termination, and retry or connection-draining implications.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.