Azure App Service Session State Storage Solution: Azure Database for PostgreSQL

Benefits of Using Azure Database for PostgreSQL for Session State Storage

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: Deploy and configure an Azure Database for PostgreSQL.

Update the web applications.

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 of deploying and configuring an Azure Database for PostgreSQL does not fully meet the stated goals of sharing session state across all ASP.NET web applications and supporting controlled, concurrent access to the same session state data for multiple readers and a single writer, as well as saving full HTTP responses for concurrent requests.

While Azure Database for PostgreSQL is a reliable and scalable database service that can meet many application requirements, it is not specifically designed for sharing session state across multiple web applications or supporting controlled concurrent access to session state data.

To meet the stated goals, a more suitable solution would be to use a distributed caching service, such as Azure Cache for Redis, that supports shared session state and can handle concurrent access to the same data. With Azure Cache for Redis, multiple instances of the web application can share the same cache, and the cache can handle multiple concurrent requests to the same data, while ensuring that only one writer can modify the data at a time.

Therefore, the proposed solution of deploying and configuring an Azure Database for PostgreSQL does not fully meet the stated goals, and the correct answer is B. No.