A social app runs in two Azure regions and keeps user session tokens in a cache. If one region fails, users must keep their sessions without signing in again. Which service should hold the session state?
Show answer and explanation
Answer: A
Azure Cache for Redis Enterprise supports active geo-replication, which keeps cached session data synchronized between regions so either region can serve requests with the same state. This suits session management, where a regional failover should not force a sign-in. Cosmos DB could store sessions, but the requirement describes a cache with active geo-replication, and wiring Functions to every write adds latency. Table Storage and In-Memory OLTP do not provide that behavior.
Why the other options are wrong
- B. Cosmos DB can store session documents, but triggering Functions on each write adds a processing hop on a hot path. The option is a database pattern rather than the cache with active geo-replication asked for.
- C. Table Storage is a key-value store without in-memory caching or active multi-region writes, so session reads would be slower and a failover would need extra work to restore state.
- D. In-Memory OLTP speeds up in-database work, but the tables live in one database in one region. It does not replicate live session state across regions for seamless continuity.