Which solution meets these requirements?
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.
Use Amazon CloudWatch metrics to monitor the CPU of each instance in the Auto Scaling groups. Configure a CloudWatch alarm to invoke an Amazon Simple Notification Service (Amazon SNS) topic that creates additional Auto Scaling groups on demand.
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. Scale the Auto Scaling groups based on notifications that the queues send.
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.
Explanations:
While monitoring CPU and setting minimum capacities can help, it doesn’t address the scaling needs of the fulfillment process which can have longer processing times and potential backlog issues.
This option suggests creating additional Auto Scaling groups on demand based on CPU metrics, which may not effectively handle the scaling needs of the fulfillment process. This approach also risks losing orders if traffic spikes suddenly.
While using SQS queues for order collection and fulfillment helps decouple the processes, it lacks a method to scale the Auto Scaling groups based on the actual workload or backlog in the queues, potentially leading to underutilization or bottlenecks.
This solution effectively decouples order collection and fulfillment using SQS queues. It allows each process to scale independently based on the backlog metrics calculated per instance, ensuring that both processes can handle peak loads efficiently and avoid data loss.