Exercise 2: Why a Shared Session Store Isn't Simply "Better" — Possible Solution ==================================================================== WHAT A SHARED SESSION STORE FIXES ------------------------------ Per this chapter, storing session data in a shared store like Redis means "any server can now correctly serve any user, removing the single-server session-loss risk sticky sessions carry." Losing one application server no longer means losing every session assigned to it. THE NEW DEPENDENCY IT INTRODUCES ------------------------------ Per this chapter's finding-box, "if the shared store itself becomes unavailable, every session everywhere fails at once - a different, and arguably more severe, single point of failure than losing sessions on one backend server." Rather than eliminating the single-point-of- failure risk, a shared store relocates it - from many individual application servers (each risking only its own assigned sessions) to one shared dependency (risking every session across the entire system at once if it goes down). THE SECOND COST: LATENCY ------------------------------ Per this chapter, a shared store "also adds a real network round-trip to every session read and write, where a local-memory lookup had none." Every session access now depends on a network call to an external service, rather than an instantaneous local memory lookup - a genuine, ongoing performance cost that sticky sessions never had. WHY NEITHER IS SIMPLY "BETTER" ------------------------------ Per this chapter, "neither approach is simply 'better' - each accepts a different kind of risk." Sticky sessions risk losing a subset of sessions when one server fails; a shared store risks losing every session if the shared dependency fails, and pays an ongoing latency cost even when nothing is failing at all. WHY THIS WORKS AS AN ANSWER ------------------------------ It names both real costs of a shared session store (a new single-point-of-failure and added latency) using the chapter's own reasoning, rather than treating it as an unambiguous improvement over sticky sessions.