A company runs a web application on EC2 instances in an Auto Scaling group. The application needs to store session state. The architecture must be highly available and scalable. Which solution should the developer choose?
Amazon ElastiCache for Redis provides a highly performant, scalable, and fully managed in-memory data store perfectly suited for externalizing session state. Its extremely low-latency read and write capabilities ensure a responsive user experience, while its built-in replication and automatic failover mechanisms guarantee high availability and durability of session data. By storing sessions externally, any EC2 instance in an Auto Scaling group can access any user's session, enabling seamless horizontal scaling and robust fault tolerance without session loss.
Why this answer
Amazon ElastiCache for Redis is a fully managed, highly available, and scalable in-memory data store that is purpose-built for session state management. It supports replication, automatic failover, and horizontal scaling, making it the ideal choice for a highly available and scalable session store across an Auto Scaling group of EC2 instances.
Exam trap
DVA-C02 often tests the difference between sticky sessions (which are not a session store) and a centralized session store like ElastiCache, causing candidates to pick sticky sessions as a scalability solution.
How to eliminate wrong answers
Option A is wrong because sticky sessions on an ALB only pin a user to a single instance; if that instance fails or is replaced by Auto Scaling, the session is lost, and it does not provide a shared, scalable session store. Option B is wrong because S3 is object storage with high latency and is not designed for the low-latency, high-throughput read/write access pattern required for session state. Option D is wrong because ephemeral instance storage is tied to a single EC2 instance and is lost on stop/terminate, making it unsuitable for highly available, scalable session management.