Azure App Service: Storing Session State and HTML Output with ARR Solution

Using ARR for Session State and HTML Output

Question

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.

Proposed Solution: Enable Application Request Routing (ARR)

Does the solution meet the goal?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B.

B.

Instead deploy and configure Azure Cache for Redis.

Update the web applications.

https://docs.microsoft.com/en-us/azure/architecture/best-practices/caching#managing-concurrency-in-a-cache

The proposed solution to enable Application Request Routing (ARR) does not fully meet the stated requirements.

ARR is a feature in IIS that provides server load balancing and content routing functionality. It can route requests to different servers based on various criteria, such as load balancing algorithms, URL, or server availability. However, ARR alone does not provide a storage mechanism to share session state across multiple ASP.NET web applications.

To meet the requirement of sharing session state across all ASP.NET web applications, you need to use a centralized storage mechanism, such as Azure Cache for Redis or SQL Server. These solutions enable all instances of the web applications to access and modify the same session state data.

In addition, the proposed solution does not meet the requirement of supporting controlled, concurrent access to the same session state data for multiple readers and a single writer. ARR does not provide any mechanism for controlling concurrent access to session state data, and multiple writers can modify the same session state data simultaneously, leading to data corruption or inconsistency.

Finally, the proposed solution does not meet the requirement of saving full HTTP responses for concurrent requests. ARR only provides content routing functionality and does not store HTTP responses.

Therefore, the correct answer is B. No, the proposed solution does not meet the stated requirements. You need to use a centralized storage mechanism, such as Azure Cache for Redis or SQL Server, to share session state data across multiple ASP.NET web applications and implement concurrency control mechanisms to ensure consistent access to the data. You may also need to use a caching mechanism, such as Azure CDN or Azure Front Door, to improve the performance and availability of the web applications.