A licensing web tier stores sessions only in local memory on each EC2 host, so Auto Scaling replacements and load-balancer drains drop citizen logins. Which reliability pattern best enables elastic, ASG-friendly behavior?
Select an answer to reveal the explanation.
Short Explanation
Sessions glued to one box hate Auto Scaling—the citizen gets bounced when that box leaves. Park session state in a shared cache so any fresh instance can pick up the clipboard.
Full Explanation
A licensing web tier that stores sessions only in local memory on each EC2 host drops citizen logins whenever Auto Scaling replaces instances or the load balancer drains targets. Moving sessions to a shared store such as ElastiCache or another external session state service enables any healthy instance to serve the citizen after scale-in or replacement. That reliability pattern works because elastic fleets require externalized state; local memory ties user affinity to a mortal host. Disabling Auto Scaling and running one oversized instance forever to protect in-memory sessions fails by abandoning elasticity to preserve an anti-pattern. Sticky-session forever to a single unhealthy host without health checks fails HA and traps users on bad nodes. Replicating /tmp session files with manually copied scp scripts between hosts during incidents fails as fragile, insecure operational theater. Exam caveat: external session stores need encryption, TTL, and failover (for example Multi-AZ Redis); also ensure session cookies remain secure for municipal authentication flows. Operational check: externalize sessions to ElastiCache in nonprod, terminate an instance mid-session, confirm the citizen remains authenticated on another host, then enable ASG replacement without login drops in production.