Session Affinity — Microsoft Azure Solutions Architect (AZ-305) Practice Questions
Session affinity, sometimes called sticky sessions, is a load-balancing behavior that routes all requests from a specific client to the same backend instance for the duration of a session, preserving in-memory session state. On AZ-305, this concept appears in the context of Azure Application Gateway (cookie-based affinity) and Azure App Service, and architects must weigh it against stateless scale-out designs that store session data externally in Azure Cache for Redis or Azure Cosmos DB. Using session affinity limits horizontal scalability and complicates rolling deployments, so the exam tests when it is necessary versus when an externalized session store is the better design. Candidates must be able to identify when sticky sessions are a temporary workaround versus a deliberate architectural choice.