Which ingress and revision mode enable Container Apps session affinity?
Short answer
D Configure HTTP ingress with single revision mode on the Azure Container App to enable cookie-based session affinity.
Question
You need to configure the container app to support session affinity.
Which ingress type and revision mode should you assign to the container app?
Key Takeaways
The question tests the two prerequisites for Container Apps sticky sessions, and the trap is assuming TCP ingress or multiple revision mode can preserve client-to-replica affinity.
Azure Container Apps session affinity uses HTTP cookies and is supported only in single revision mode; this page establishes that HTTP ingress plus single revision mode (D) is the correct configuration.
Common mistake: A common wrong pick is HTTP ingress with multiple revision mode, because multiple revisions sound like they improve routing; however session affinity is supported only in single revision mode, so splitting traffic across revisions breaks the guarantee.
Expert Analysis
Why the Answer Is Correct
Azure Container Apps session affinity keeps a client on the same replica by using HTTP cookies, which means the ingress must be HTTP rather than TCP. The platform also supports this sticky-session behavior only in single revision mode, where one active revision receives all traffic and the client-to-replica mapping stays consistent. Therefore HTTP ingress type combined with single revision mode (D) satisfies both prerequisites. The decisive configuration is to enable HTTP ingress and set the Container App revision mode to single.
Why the Other Options Are Wrong
A uses TCP ingress with single revision mode: the revision mode is right, but TCP operates at Layer 4 and cannot inspect HTTP cookies, so session affinity cannot work. B uses TCP ingress with multiple revision mode and fails on both prerequisites. C uses HTTP ingress but multiple revision mode, where traffic can be split across revisions and the sticky-session guarantee is not supported. None of these combinations provides the cookie-based client-to-replica consistency that Container Apps session affinity requires.
Community Comment Notes
MuhammadSaqib selected D and explained that sticky sessions are "based on client-to-replica consistency using HTTP cookies," which is why TCP ingress is unsuitable. The same comment stresses that Container Apps relies on its built-in session affinity mechanism, reinforcing that the ingress type must be HTTP. The comment also points toward the platform constraint that makes single revision mode necessary for this scenario.
Official Reference
- https://learn.microsoft.com/en-us/azure/container-apps/sticky-sessions
- https://learn.microsoft.com/en-us/azure/container-apps/ingress-overview
These links open the official vendor documentation in a new tab.
Exam Strategy
Memorize the dependency: Container Apps session affinity requires HTTP ingress and single revision mode. When an option uses TCP, eliminate it immediately because TCP is Layer 4 and cannot inspect HTTP cookies; then reject multiple revision mode because affinity is not supported there.
Frequently Asked Questions
Why does Azure Container Apps session affinity require single revision mode?
Can TCP ingress be used for Azure Container Apps sticky sessions?
Discussion 1 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 1
-
MuhammadSaqib 👍 1 Answered D1. HTTP Ingress Type Session affinity (sticky sessions) is based on client-to-replica consistency using HTTP cookies. HTTP ingress is not supported because TCP routing is done at a lower layer in the network stack (Layer 4) and does not interact with HTTP application layer components like cookies. 2. Single Revision Mode: Container app supports only the session affinity mechanism built into the platform when the container app is in single revision mode.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.