AWS Certified Solutions Architect – Associate (SAA-C03) — Question 91
A company's HTTP application is behind a Network Load Balancer (NLB). The NLB's target group is configured to use an Amazon EC2 Auto Scaling group with multiple EC2 instances that run the web service.
The company notices that the NLB is not detecting HTTP errors for the application. These errors require a manual restart of the EC2 instances that run the web service. The company needs to improve the application's availability without writing custom scripts or code.
What should a solutions architect do to meet these requirements?
Answer options
- A. Enable HTTP health checks on the NLB, supplying the URL of the company's application.
- B. Add a cron job to the EC2 instances to check the local application's logs once each minute. If HTTP errors are detected. the application will restart.
- C. Replace the NLB with an Application Load Balancer. Enable HTTP health checks by supplying the URL of the company's application. Configure an Auto Scaling action to replace unhealthy instances.
- D. Create an Amazon Cloud Watch alarm that monitors the UnhealthyHostCount metric for the NLB. Configure an Auto Scaling action to replace unhealthy instances when the alarm is in the ALARM state.
Correct answer: C
Explanation
The correct answer is C because switching to an Application Load Balancer allows for more effective handling of HTTP errors through built-in health checks, which can automatically manage instance replacements. Option A only enables health checks on the NLB, which does not provide the same level of functionality as an Application Load Balancer. Option B relies on a manual process with a cron job, and option D requires monitoring without addressing the issue of HTTP errors directly.