A growing food delivery company has two Auto Scaling groups of Amazon EC2 instances: one group collects orders (fast) and another fulfills orders (longer processing). Data must not be lost during scaling events. The solution must allow both processes to scale properly during peak hours and optimize AWS resource usage. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Provision two Amazon Simple Queue Service (Amazon SQS) queues: one for order collection and another for order fulfillment. Configure the EC2 instances to poll their respective queue. Create a metric based on a backlog per instance calculation. Scale the Auto Scaling groups based on this metric..
Why this is the answer
The correct solution uses Amazon SQS queues to decouple the order collection and fulfillment processes, ensuring data is not lost during scaling events. By configuring EC2 instances to poll their respective queues, messages are retained even if instances terminate. Scaling based on a "backlog per instance" metric (e.g., ApproximateNumberOfMessagesVisible / NumberOfInstances) allows for efficient scaling. When the backlog per instance increases, it indicates that the current instances cannot process messages fast enough, triggering the Auto Scaling group to add more instances. This optimizes resource usage by scaling out only when necessary and scaling in when the backlog decreases. The other options are less effective: Monitoring CPU utilization alone might not accurately reflect the processing backlog, especially if tasks are I/O-bound or waiting for external services. Setting a fixed minimum capacity doesn't optimize resource usage. Creating additional Auto Scaling groups on demand via SNS is overly complex and not a standard scaling pattern for managing existing groups. Scaling based on notifications that queues send is not a direct Auto Scaling metric. Auto Scaling groups need a quantifiable metric like queue length or backlog per instance to make scaling decisions.
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