AZ-204 practice question 7 of 35

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution…

Full set: 489 questions

Domain Monitor, troubleshoot, and optimize Azure solutions

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution. Determine whether the solution meets the stated goals. You are developing and deploying several ASP.NET web applications to Azure App Service. You plan to save session state information and HTML output. You must use a storage mechanism with the following requirements: Share session state across all ASP.NET web applications. Support controlled, concurrent access to the same session state data for multiple readers and a single writer. Save full HTTP responses for concurrent requests. You need to store the information. Solution: Enable Application Request Routing (ARR). Does the solution meet the goal?
Answer options
A: Yes
B: No Correct answer
Correct Answer:
B. No
Explanation

The proposed solution, enabling Application Request Routing (ARR), does not meet the stated goals. ARR Affinity (also known as "sticky sessions") is a load-balancing feature in Azure App Service that directs all requests from a single client to the same web app instance. This avoids the need for a distributed session state in simple scale-out scenarios but does not provide a shared storage mechanism. It does not allow session state to be shared across different web applications, nor does it provide a distributed cache for HTML output. The requirements explicitly call for a shared storage mechanism for both session state and output caching, which points to a solution like Azure Cache for Redis, not a request routing feature.

Why Incorrect

A. Yes: This is incorrect because ARR is a request routing and load-balancing mechanism, not a data storage or caching solution. It cannot fulfill the requirements of sharing session state across applications or caching HTTP responses.

References

1. Microsoft Docs, Azure App Service, "Configure general settings": Under the "Platform settings" section, the "ARR affinity" setting is described. It states, "If you have a stateless application, we recommend disabling this setting. If you have a stateful application, we recommend enabling this setting. For example, if your application uses session variables, it's stateful." This confirms ARR is about routing for stateful vs. stateless apps, not providing the state store itself.

2. Microsoft Docs, Azure Cache for Redis, "ASP.NET Session State Provider for Azure Cache for Redis": This document explicitly states, "Storing session state in a cache is useful in a web farm because... you are not tying the user session to a single machine." This directly addresses the requirement for a shared state mechanism, which ARR does not provide.

3. Microsoft Docs, Azure Cache for Redis, "ASP.NET Output Cache Provider for Azure Cache for Redis": This document details how to use a distributed cache for storing HTTP responses. It explains, "The output cache provider plugs into the output caching extensibility point... For web applications that run in a web farm, using a distributed cache for the output cache can provide a significant performance benefit." This highlights the correct technology for the output caching requirement.

Scroll to Top