
Answer-first summary for fast verification
Answer: Route incoming requests to Amazon Simple Queue Service (Amazon SQS). Configure an EC2 Auto Scaling group based on queue size. Update the software to read from the queue.
## Explanation The correct answer is **D** because it addresses both the immediate performance issue and provides a scalable solution for future load. ### Analysis of the Problem: 1. **Current Issue**: EC2 instances have 100% CPU utilization, causing some data processing jobs to be dropped or not processed. 2. **Requirements**: - Improve system performance - Scale the system based on user load ### Why Option D is Correct: 1. **Decouples Request Processing**: By routing incoming requests to Amazon SQS, the system becomes asynchronous and resilient. Requests are queued rather than being lost when instances are overloaded. 2. **Auto-scaling Based on Actual Load**: Configuring an EC2 Auto Scaling group based on queue size ensures that: - When the queue grows (more jobs waiting), more instances are automatically launched - When the queue shrinks (fewer jobs), instances are terminated - This provides true elasticity based on actual workload 3. **Prevents Request Loss**: With SQS, user requests are stored in a durable queue and won't be lost even if all instances are busy or fail. 4. **Better Resource Utilization**: Instances can process jobs at their own pace from the queue, preventing CPU saturation. ### Why Other Options Are Incorrect: **A**: Simply creating copies and using a load balancer doesn't solve the core problem. Load balancers distribute traffic, but if all instances are at 100% CPU, adding more behind a load balancer won't prevent request loss during peak loads. It also doesn't provide automatic scaling based on load. **B**: S3 VPC endpoints improve network performance to S3 but don't address the CPU bottleneck or provide scaling capabilities. This might slightly improve data transfer speeds but won't solve the fundamental processing capacity issue. **C**: Upgrading to a more powerful instance type is a temporary fix (vertical scaling) that doesn't provide elasticity. It's costly and doesn't scale automatically with user load. Eventually, even the larger instance will hit capacity limits. ### Key AWS Services Used: - **Amazon SQS**: Provides reliable message queuing service - **EC2 Auto Scaling**: Automatically adjusts the number of EC2 instances based on metrics (in this case, queue size) - **CloudWatch**: Already being used for monitoring; can be integrated with Auto Scaling This solution implements a decoupled, scalable architecture that can handle variable workloads efficiently while preventing data processing jobs from being lost.
Ultimate access to all questions.
No comments yet.
Author: LeetQuiz Editorial Team
A company runs analytics software on Amazon EC2 instances. The software accepts job requests from users to process data that has been uploaded to Amazon S3. Users report that some submitted data is not being processed. Amazon CloudWatch reveals that the EC2 instances have a consistent CPU utilization at or near 100%. The company wants to improve system performance and scale the system based on user load.
What should a solutions architect do to meet these requirements?
A
Create a copy of the instance. Place all instances behind an Application Load Balancer.
B
Create an S3 VPC endpoint for Amazon S3. Update the software to reference the endpoint.
C
Stop the EC2 instances. Modify the instance type to one with a more powerful CPU and more memory. Restart the instances.
D
Route incoming requests to Amazon Simple Queue Service (Amazon SQS). Configure an EC2 Auto Scaling group based on queue size. Update the software to read from the queue.