Which solution will meet these requirements?
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.
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.
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.
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.
Explanations:
While monitoring CPU utilization and configuring minimum capacity can help, it does not address the problem of data loss or ensure adequate scaling during peak hours since it does not utilize a queue for decoupling the order processing and fulfillment.
This option also relies solely on CPU utilization metrics and would create additional Auto Scaling groups on demand, which is not necessary and does not address the need to ensure that order data is not lost during scaling events.
Although using SQS queues for order collection and fulfillment is a good architectural choice, it does not specify scaling the Auto Scaling groups based on the number of messages in the queues, which is crucial for handling varying workloads.
This solution effectively decouples the order collection and fulfillment processes using SQS queues, allowing the EC2 instances to poll messages and scale based on the number of messages in each queue. This approach prevents data loss during scaling events and ensures adequate scaling during peak traffic hours.