A web app on EC2 behind an ALB uses blue/green immutable deployments. Users are randomly logged out during testing and everyone is logged out when a new version deploys. The team needs users to stay logged in across scaling events and deployments with the least operational overhead. What is the most operationally efficient solution?
Choose an answer
Tap an option to check your answer.
Correct answer: Change the application to store session data in an Amazon ElastiCache cluster..
Why this is the answer
Storing session data in an Amazon ElastiCache cluster (either Redis or Memcached) is the most operationally efficient solution. ElastiCache provides a highly available, scalable, and fast in-memory data store, ideal for session management. This centralizes session data, allowing any EC2 instance to access it, thus maintaining user sessions across blue/green deployments and scaling events without interruption. Enabling smart sessions or session sharing on the load balancer (ALB) is not a standard feature. While ALBs support sticky sessions, this only directs subsequent requests from a user to the same instance, which doesn't solve the problem of immutable deployments or instance replacement. Storing session data in an S3 bucket would introduce significant latency due to S3's object storage nature, making it unsuitable for real-time session management.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed