How Do You Keep NLB Traffic in the Same AZ While Allowing Failover?
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?
Community Votes
67% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests whether you know the built-in failover behavior of an NLB when cross-zone load balancing is disabled, rather than relying on DNS-level failover policies.
The correct solution is to disable cross-zone load balancing on the NLB and have the front end use the local AZ NLB DNS record. This keeps traffic local unless no healthy targets exist in the AZ, at which point the NLB automatically sends traffic to healthy targets in the other AZ.
Many candidates choose C because they think Route 53 failover records are needed to redirect traffic to the other AZ. They miss that the NLB already does this when cross-zone load balancing is off, making DNS failover unnecessary and over-engineered.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Correct Answer: B
Turn off cross-zone load balancing on the NLB and configure the front end to use the local Availability Zone NLB DNS record.
Why B Is Correct
When cross-zone load balancing is disabled, each NLB node routes traffic only to targets in its own Availability Zone. If there are no healthy targets in that Availability Zone, the NLB node automatically forwards traffic to healthy targets in the other Availability Zone. This behavior exactly matches the requirement: traffic stays in the same AZ whenever possible, and fails over only when the local AZ has no healthy targets.
The second part of the answer, using the local AZ NLB DNS record, ensures that the front-end instances resolve the NLB node IP in their own AZ. If the front end used the regional NLB DNS name, it might resolve to a node in the other AZ, causing unnecessary cross-AZ traffic before the NLB even processes the request.
Why C Is Not The Best Choice
Option C adds Route 53 failover records with a private hosted zone. This is over-engineered because the NLB already performs health-based failover at the load balancer level. Failover records rely on DNS health checks and add latency due to DNS TTL. They also test the DNS endpoint, not the health of the backend targets, so they do not accurately reflect the requirement of failing over only when there is no healthy target in the AZ.
Why A And D Are Incorrect
Option A uses weighted routing, which cannot guarantee that all traffic stays in the same AZ. Weighted routing sends a configured percentage of traffic to each target; it does not check backend health for the AZ-local behavior described in the question.
Option D uses sticky sessions (session affinity), which only keeps a user’s session on the same backend target. It does not control which AZ receives the traffic and can actually maintain sessions on a target in a different AZ, increasing cross-AZ traffic.
Community Consensus
The community vote strongly favors B (67 votes) over C (33 votes). As one candidate noted, disabling cross-zone load balancing means traffic is routed only within the same AZ unless no healthy targets are available, which is exactly what the requirement asks for.
Official Reference
Exam Strategy
Look for phrasing like 'stay in the same Availability Zone unless no healthy target' — this maps directly to NLB’s cross-zone load balancing disabled behavior. Avoid choosing DNS-based failover solutions when the load balancer itself can handle the failover automatically.
Related Analysis
Practice All ANS-C01 Questions
Access 137 questions with complete answers and detailed explanations.
View Full ANS-C01 Practice Test →