Which ingress and revision mode enable Container Apps session affinity?

Answer Correct answer: D — configure HTTP ingress with single revision mode on the Azure Container App to enable cookie-based session affinity.

You plan to deploy an Azure Container app. You need to configure the container app to support session affinity. Which ingress type and revision mode should you assign to the container app?

  1. TCP ingress type and single revision mode
  2. TCP ingress type and multiple revision mode
  3. HTTP ingress type and multiple revision mode
  4. HTTP ingress type and single revision mode Correct Answer

Community Insight

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.

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.

Community Discussion (1 comments)

MuhammadSaqib 👍 1 Selected: D
1. 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.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

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

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?

Session affinity is supported only when one revision handles all traffic; multiple revision mode can split requests across revisions, so the client-to-replica cookie mapping is not guaranteed.

Can TCP ingress be used for Azure Container Apps sticky sessions?

No. TCP ingress operates at Layer 4 and does not inspect HTTP cookies, so it cannot implement the cookie-based session affinity that Container Apps provides through HTTP ingress.

More AI-200 FAQ →

Related Analysis

← Back to AI-200 Study Guide