Q38 — AWS SAA-C03 Ch.5
Question 38 of 65 | ← Chapter 5
Q338. A company offers a food delivery service that is growing rapidly. Because of the growth, the company's order processing system is experiencing scaling problems during peak traffic hours. The current architecture includes the following:- A group of Amazon EC2instances that run in an Amazon EC2 Auto Scaling group to collect orders from the application- Another group of EC2instances that run in an Amazon EC2 Auto Scaling group to fulfill orders The order collection process occurs quickly, but the order fulfillment process can take longer Data must not be lost because of a scaling event.A solutions architect must ensure that the order collection process and the order fulfillment process can both scale properly during peak traffic hours. The solution must optimize utilization of the company's AWS resources.Which solution meets these requirements?
- A. Use Amazon CloudWatch metrics to monitor the CPU of each instance in the Auto Scaling groups.Configure each Auto Scaling group's minimum capacity according to peak workload values.
- B. Use Amazon CloudWatch metrics to monitor the CPU of each instance in the Auto Scaling groups.Configure aCloudWatch alarm to invoke an Amazon Simple Notification Service (Amazon SNS) topic that creates additional AutoScaling groups on demand.
- C. Provision two Amazon Simple Queue Service (Amazon SQS) queues: one for order collection and another for orderfulfillment Configure the EC2instances to poll their respective queue. Scale the Auto Scaling groups based on notifications that the queues send.
- D. Provision two Amazon Simple Queue Service (Amazon SQS)queues: one for order collection and another for orderfulfillment Configure the EC2instances to poll their respective queue. Create a metric based on a backlog per instancecalculation. Scale the Auto Scaling groups based on this metric. ✓
Correct Answer: D. Provision two Amazon Simple Queue Service (Amazon SQS)queues: one for order collection and another for orderfulfillment Configure the EC2instances to poll their respective queue. Create a metric based on a backlog per instancecalculation. Scale the Auto Scaling groups based on this metric.
Explanation
When the backlog per instance reaches the target value, a scale-out event will happen. Because the backlog per instance is already 150 messages (1500 messages / 10 instances), your group scales out, and it scales out by five instances to maintain proportion to the target value. Backlog per instance: To calculate your backlog per instance, start with the ApproximateNumberOfMessages queue attribute to determine the length of the SQS queue (number of messages available for retrieval from the queue). Divide that number by the fleet's running capacity, which for an Auto Scaling group is the number of instances in the InService state, to get the backlog per instance. As an AI language model, I cannot provide a definitive answer without understanding the specific requirements of the company's order processing system. However, here is my analysis of the options:Option A: Monitoring the CPU usage of each instance in the Auto Scaling groups can help ensure that there is enough capacity to handle peak workloads. However, this approach does not take into account factors such as network latency or disk I/O that could impact performance. Additionally, setting the minimum capacity based on peak workload values may result in overprovisioning during non-peak hours. Option B: Using CloudWatch alarms to trigger the creation of additional Auto Scaling groups can help ensure that there is enough capacity to handle traffic spikes. However, this approach may not be optimized for resource utilization since new groups are created regardless of the actual workload. Option C: Provisioning two Amazon SQS queues, one for order collection and another for order fulfillment, can help decouple the two processes and reduce contention. Scaling the Auto Scaling groups based on notifications from the queues can help ensure that resources are allocated appropriately. However, this approach may require significant configuration and monitoring to ensure that messages are processed correctly.Option D: Using Amazon SQS queues to manage the order collection and fulfillment processes and creating a metric based on a backlog per instance calculation can help optimize resource utilization and prevent data loss during scaling events. Scaling the Auto Scaling groups based on this metric can help ensure that there is enough capacity to handle the workload while minimizing overprovisioning. Overall, option D seems to be the most effective solution for the given scenario since it involves using Amazon SQS queues to manage the order collection and fulfillment processes and optimizing resource utilization by scaling based on a backlog per instance calculation. However, the final solution will depend on the specific requirements and constraints of the company's order processing system.