Q87 — AWS SAA-C03 Ch.11

Question 87 of 100 | ← Chapter 11

Q787. A company runs a highly available web application on Amazon EC2 instances behind an Application Load Balancer. The company uses Amazon CloudWatch metrics.As the traffic to the web application increases, some EC2 instances become overloaded with many outstanding requests. The CloudWatch metrics show that the number of requests processed and the time to receive the responses from some EC2 instances are both higher compared to other EC2 instances. The company does not want new requests to be forwarded to the EC2 instances that are already overloaded.Which solution will meet these requirements?

Correct Answer: D. Use the least outstanding requests algorithm based on the RequestCount and TargetResponseTime CloudWatch metrics.

Explanation

The least outstanding requests algorithm is designed to distribute requests to instances based on the number of outstanding requests. When an EC2 instance becomes overloaded with many outstanding requests, using this algorithm will help prevent new requests from being sent to those instances, thereby distributing the load more evenly across the healthy instances.The RequestCount metric in CloudWatch provides the total number of requests processed by each target (EC2 instance), and the TargetResponseTime metric provides the time taken to receive responses from each target. By using these metrics, the load balancer can determine which instances have a higher number of outstanding requests and longer response times, indicating potential overload.Here's why the other options are not the correct choices:A. Using the round robin routing algorithm based on the RequestCountPerTarget and ActiveConnectionCount metrics: The round robin routing algorithm distributes requests equally among all targets, regardless of their current workload. This does not consider the fact that some EC2 instances may be overloaded with many outstanding requests. It would not prevent new requests from being forwarded to overloaded instances.B. Using the least outstanding requests algorithm based on the RequestCountPerTarget and ActiveConnectionCount metrics: While considering the RequestCountPerTarget metric is a step in the right direction, the ActiveConnectionCount metric may not accurately reflect the workload of an instance. It is more appropriate to use the TargetResponseTime metric, which indicates the time taken to receive responses from instances.C. Using the round robin routing algorithm based on the RequestCount and TargetResponseTime metrics: The round robin routing algorithm does not take into account the workload of the EC2 instances. The RequestCount metric alone does not provide information about the outstanding requests, and the TargetResponseTime metric may not accurately reflect the load on an instance.Therefore, the correct solution to meet the requirement is:D. Use the least outstanding requests algorithm based on the RequestCount and TargetResponseTime CloudWatch metrics.