DVA-C02 · Question #107
An e-commerce web application that shares session state on-premises is being migrated to AWS. The application must be fault tolerant, natively highly scalable, and any service interruption should not
The correct answer is A. Store the session state in Amazon ElastiCache.. Amazon ElastiCache is the purpose-built AWS service for storing session state, providing sub-millisecond in-memory access, high availability, and automatic failover to ensure no user experience disruption.
Question
An e-commerce web application that shares session state on-premises is being migrated to AWS. The application must be fault tolerant, natively highly scalable, and any service interruption should not affect the user experience. What is the best option to store the session state?
Options
- AStore the session state in Amazon ElastiCache.
- BStore the session state in Amazon CloudFront.
- CStore the session state in Amazon S3.
- DEnable session stickiness using elastic load balancers.
How the community answered
(25 responses)- A88% (22)
- C8% (2)
- D4% (1)
Why each option
Amazon ElastiCache is the purpose-built AWS service for storing session state, providing sub-millisecond in-memory access, high availability, and automatic failover to ensure no user experience disruption.
ElastiCache (Redis or Memcached) is specifically designed for low-latency, high-throughput session data storage. Redis supports replication and automatic failover across Availability Zones, making it fault tolerant. It scales horizontally and is decoupled from the application tier, so any application instance can retrieve session data, enabling true horizontal scalability.
CloudFront is a content delivery network for caching static and dynamic content at edge locations; it is not designed to store mutable, user-specific session state.
Amazon S3 is object storage optimized for large, infrequently accessed objects; its eventual-consistency model and higher latency make it unsuitable for session state requiring millisecond read/write performance.
Session stickiness routes a user to the same instance, creating a single point of failure and preventing true horizontal scaling, which directly contradicts the fault-tolerant and scalable requirements.
Concept tested: ElastiCache for fault-tolerant distributed session management
Source: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/elasticache-use-cases.html
Community Discussion
No community discussion yet for this question.