How Do You Keep NLB Traffic in the Same AZ While Allowing Failover?
Short answer
B Turn off cross-zone load balancing on the NLConfigure the front end of the application to perform DNS lookups on the local Availability Zone NLB DNS record.
Question
Key Takeaways
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.
Common mistake: 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.
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
- https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones
- https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html
These links open the official vendor documentation in a new tab.
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.
Community Votes
67% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 5
-
c1193d4 👍 3 Answered CIf B: I don't see how the failover would work if cross-zone load-balancing is OFF and only the AZ NLB endpoint is used A better solution would be to tweek the "AZ routing configuration" to "AZ affinity" but it's not describe as a solution
-
Cacheirez 👍 2 Answered BBy disabling cross-zone load balancing on the NLB, the NLB will only route traffic to targets within the same Availability Zone as the incoming request. If no healthy targets exist in the local AZ, the NLB will route the traffic automatically to targets in another AZ.
-
AzureDP900 👍 1 Answered BBy disabling cross-zone load balancing, traffic will only be routed within the same Availability Zone unless there are no healthy targets available in that zone. This ensures that traffic from the front end of the application stays within the same Availability Zone unless necessary.
-
aragon_saa 👍 2 Answered BAnswer is B
-
cas_tori 👍 1 Answered Bthis is B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All ANS-C01 Questions
Access 137 questions with complete answers and detailed explanations.
View Full ANS-C01 Practice Test →