AWS Certified Advanced Networking – Specialty (ANS-C01) — Question 200

A company has deployed an application in which the front end of the application communicates with the backend instances through a Network Load Balancer (NLB) in the same VPC. The application is highly available across two Availability Zones. The company wants to limit the amount of traffic that travels across the Availability Zones. Traffic from the front end of the application must stay in the same Availability Zone unless there is no healthy target in that Availability Zone behind the NLB. If there is no healthy target in the same Availability Zone, traffic must be sent to the other Availability Zone.

Which solution will meet these requirements?

Answer options

Correct answer: C

Explanation

Option C is correct because it ensures that traffic remains within the same Availability Zone while providing a fallback to the other zone if necessary through failover records. Option A uses weighted routing, which does not prioritize local targets effectively, while option B turns off cross-zone load balancing but doesn't address the requirement for DNS lookups. Option D focuses on session affinity, which does not control traffic routing based on target health in Availability Zones.