Q48 — AWS SAA-C03 Ch.14
Question 48 of 100 | ← Chapter 14
Q1048. A company operates a food delivery service. Because of recent growth, the company's order processing system is experiencing scaling problems during peak traffic hours. The current architecture includes Amazon EC2 instances in an Auto Scaling group that collect orders from an application. A second group of EC2 instances in an Auto Scaling group fulfills the 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 adequately during peak traffic hours.Which solution will meet these requirements?
- A. Use Amazon CloudWatch to monitor the CPUUtilization metric for each instance in both Auto Scaling groups. Configure each Auto Scaling group's minimum capacity to meet its peak workload value.
- B. Use Amazon CloudWatch to monitor the CPUUtilization metric for each instance in both Auto Scaling groups. Configure a CloudWatch alarm to invoke an Amazon Simple Notification Service (Amazon SNS) topic to create additional Auto Scaling groups on demand.
- C. Provision two Amazon Simple Queue Service (Amazon SQS) queues. Use one SQS queue for order collection. Use the second SQS queue for order fulfillment. Configure the EC2 instances to poll their respective queues. Scale the Auto Scaling groups based on notifications that the queues send.
- D. Provision two Amazon Simple Queue Service (Amazon SQS) queues. Use one SQS queue for order collection. Use the second SQS queue for order fulfillment. Configure the EC2 instances to poll their respective queues. Scale the Auto Scaling groups based on the number of messages in each queue. ✓
Correct Answer: D. Provision two Amazon Simple Queue Service (Amazon SQS) queues. Use one SQS queue for order collection. Use the second SQS queue for order fulfillment. Configure the EC2 instances to poll their respective queues. Scale the Auto Scaling groups based on the number of messages in each queue.
Explanation
To ensure that both the order collection and order fulfillment processes can scale adequately during peak traffic hours while preventing data loss, the best solution is:D. Provision two Amazon Simple Queue Service (Amazon SQS) queues. Use one SQS queue for order collection. Use the second SQS queue for order fulfillment. Configure the EC2 instances to poll their respective queues. Scale the Auto Scaling groups based on the number of messages in each queue.Explanation:\1. Decoupling with SQS: - Using SQS allows the order collection and order fulfillment processes to be decoupled. This means that the order collection can proceed without waiting for the fulfillment process, thus improving overall system responsiveness.\2. Scalability: - By having separate SQS queues, you can independently scale the Auto Scaling group for the order fulfillment EC2 instances based on the number of messages in the fulfillment queue. This allows you to handle spikes in orders efficiently.\3. Prevention of Data Loss: - SQS ensures that messages (orders) are retained in the queue until they are successfully processed, which helps prevent data loss during scaling events or processing delays.\4. Polling Mechanism: - EC2 instances can poll the SQS queues to retrieve messages as they become available. This dynamic processing model allows for efficient usage of resources based on current demand.Evaluation of Other Options:A. Use Amazon CloudWatch to monitor the CPUUtilization metric for each instance in both Auto Scaling groups: - While monitoring CPU utilization is important, simply configuring minimum capacities does not address the need for dynamic scaling based on workload. It also doesn’t provide a mechanism for handling message processing efficiently.B. Use Amazon CloudWatch to monitor the CPUUtilization metric for each instance in both Auto Scaling groups: - This option suggests using CloudWatch alarms to invoke an SNS topic to create additional Auto Scaling groups on demand, which is overly complex and does not directly address the need for queue-based processing.C. Provision two Amazon SQS queues: - While this option suggests using SQS for decoupling, it does not mention scaling the Auto Scaling groups based on the number of messages in the queues. Without this scaling mechanism, you may still encounter bottlenecks during peak times.Conclusion:Option D provides a robust, scalable, and fault-tolerant architecture that effectively handles the order collection and fulfillment processes while ensuring data integrity and responsiveness during peak traffic hours.