AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A financial services company is collecting real-time trade data from thousands of mobile client applications. This data is sent to a central processing system running on a fleet of Amazon EC2 instances. The volume of incoming data is highly variable, with massive, unpredictable spikes during market open and close. The backend processing system can only handle a steady rate of transactions and frequently fails when it receives a sudden burst of requests, resulting in data loss. The company needs a solution to decouple the data ingestion from the processing system to handle these spikes. A critical requirement is that all trades originating from a single client application must be processed in the exact order they were submitted.
Implement Amazon Kinesis Data Streams with a sufficient number of shards to handle the peak load. Use the client application's unique ID as the partition key to maintain order.
Configure the client applications to send trade data to an Amazon SQS FIFO queue. Use the client application's unique ID as the MessageGroupId for each message. The EC2 instances will then poll the queue for messages to process.
Place an Application Load Balancer in front of the EC2 instances and configure it with sticky sessions to route all requests from a single client to the same instance.
Configure the client applications to send trade data to an Amazon SQS Standard queue. Configure the EC2 fleet in an Auto Scaling group to scale out based on the queue depth.
The correct solution is to use an Amazon SQS FIFO queue with the client's unique ID as the MessageGroupId. This approach effectively decouples the producers (client apps) from the consumers (EC2 instances) and provides a buffer to smooth out traffic spikes, preventing the backend from being overwhelmed.
Using a FIFO (First-In-First-Out) queue is essential to meet the strict ordering requirement. By assigning the unique client ID to the MessageGroupId, all messages from that specific client are processed in the exact order they are received, while messages from different clients (with different MessageGroupIds) can be processed in parallel. This provides both the required ordering and high throughput.
An Amazon SQS Standard queue is incorrect because it only provides best-effort ordering and does not guarantee that messages will be processed in the order they were sent, which violates a critical requirement.
While Amazon Kinesis Data Streams can maintain order using a partition key, it is primarily designed for real-time streaming analytics and is more complex to manage than SQS for this simple work-offloading use case. SQS FIFO is the more purpose-built and efficient solution for decoupling and buffering with ordered processing for backend workers.
An Application Load Balancer does not provide a buffering mechanism. It forwards requests directly to the backend targets. During a traffic spike, the ALB would still overwhelm the EC2 instances, leading to the same failures.
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 the purpose of using Amazon SQS FIFO queues in this solution?
Open an interactive chat with Bash
What is the role of `MessageGroupId` in maintaining message order?
Open an interactive chat with Bash
Why is Amazon SQS a better choice than Amazon Kinesis for this use case?
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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .