An application runs on many EC2 instances behind an Elastic Load Balancer. Where should session data be stored so it can be reliably served across requests from different instances?
Choose an answer
Tap an option to check your answer.
Correct answer: Store session data in Amazon ElastiCache..
Why this is the answer
Storing session data in Amazon ElastiCache is the correct approach for applications running on multiple EC2 instances behind an Elastic Load Balancer. ElastiCache provides a high-performance, in-memory data store that is accessible by all EC2 instances, ensuring session stickiness and data availability even if a user's subsequent request is routed to a different instance. This centralizes session management and prevents data loss if an instance fails. Storing session data on Amazon Elastic Block Store (EBS) is not suitable because EBS volumes are attached to a single EC2 instance at a time, making them inaccessible to other instances. Storing data on the EC2 instance store (ephemeral storage) is problematic as this data is lost when the instance stops or terminates, and it's not shared across instances. Similarly, storing data on the root filesystem of the EC2 instances suffers from the same limitations as instance store, lacking persistence and shared access across the fleet.
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