AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 103
A company is testing a web application that runs on Amazon EC2 instances behind an Application Load Balancer. The instances run in an Auto Scaling group across multiple Availability Zones. The company uses a blue/green deployment process with immutable instances when deploying new software.
During testing, users are being automatically logged out of the application at random times. Testers also report that, when a new version of the application is deployed, all users are logged out. The development team needs a solution to ensure users remain logged in across scaling events and application deployments.
What is the MOST operationally efficient way to ensure users remain logged in?
Answer options
- A. Enable smart sessions on the load balancer and modify the application to check for an existing session.
- B. Enable session sharing on the load balancer and modify the application to read from the session store.
- C. Store user session information in an Amazon S3 bucket and modify the application to read session information from the bucket.
- D. Modify the application to store user session information in an Amazon ElastiCache cluster.
Correct answer: D
Explanation
The correct answer is D because using Amazon ElastiCache allows for quick access and storage of session data, ensuring users remain logged in even during scaling events and deployments. Options A and B do not provide a robust solution for session persistence across deployments. Option C is inefficient due to the slower access times of S3 compared to ElastiCache.