AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A company runs a real-time bidding (RTB) platform on AWS. The platform's front end consists of a fleet of EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB), distributed across three Availability Zones (AZs) in the us-east-1 region. The application requires maintaining user session state for several minutes to optimize bidding strategy. The current implementation stores session data in memory on individual EC2 instances. During a recent AZ failure, a significant number of active user sessions were lost, leading to a negative financial impact. The business now requires a solution that can withstand an AZ failure with minimal session data loss while maintaining low-latency read/write access to the session store. Which solution should a solutions architect recommend to meet these high-availability and performance requirements most effectively?
Deploy an Amazon ElastiCache for Redis cluster with Multi-AZ enabled and configure the application to use it as the central session store.
Enable session affinity (sticky sessions) on the Application Load Balancer to route a user's requests to the same EC2 instance.
Modify the application to serialize session data and store it as objects in an Amazon S3 Standard bucket.
Refactor the application to store session data in an Amazon DynamoDB table and place a DynamoDB Accelerator (DAX) cluster in front of it.
The correct solution is to deploy an Amazon ElastiCache for Redis cluster with Multi-AZ enabled. ElastiCache for Redis is an in-memory data store that provides sub-millisecond latency for both reads and writes, which is ideal for a high-performance, real-time bidding application's session store. By enabling the Multi-AZ feature, ElastiCache automatically provisions and maintains a replica in a different Availability Zone and will automatically fail over to it in the event of a primary node or AZ failure, thus meeting the high-availability requirement.
Storing session data in an Amazon DynamoDB table is a plausible but less optimal solution. While DynamoDB is highly available and durable, it is a disk-based database service that typically has single-digit millisecond latency, which is higher than an in-memory solution like ElastiCache. Although DynamoDB Accelerator (DAX) can reduce read latency to microseconds, it is a write-through cache, meaning writes still incur the latency of the underlying DynamoDB table, and it adds complexity and cost. For a real-time application where both read and write latency are critical, ElastiCache for Redis is the more performant choice.
Enabling sticky sessions on the Application Load Balancer is incorrect because it binds a user's session to a single EC2 instance. This directly contradicts the requirement to withstand an AZ failure, as the session data stored on that instance would be lost if the instance or its entire AZ fails.
Using Amazon S3 for session storage is not appropriate for this use case. S3 is an object storage service designed for durability and scalability, not for the low-latency, high-frequency read and write operations required for a session store. The latency of S3 would be far too high for a real-time bidding platform.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Amazon ElastiCache, and why is it suitable for real-time applications?
Open an interactive chat with Bash
What is the Multi-AZ deployment feature in ElastiCache for Redis, and how does it work?
Open an interactive chat with Bash
How does Amazon DynamoDB compare to ElastiCache in terms of latency for real-time use cases?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access