Skip to content

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

@Tech-Fello

Description

@Tech-Fello

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions