
Answer-first summary for fast verification
Answer: Create a private hosted zone. Create a failover record for each Availability Zone. For each failover record, point the primary record to the local Availability Zone NLB DNS record and point the secondary record to the Regional NLB DNS record. Configure the front end of the application to perform DNS lookups on the local private hosted zone records.
The question revolves around ensuring that traffic from the front end of an application stays within the same Availability Zone (AZ) unless there is no healthy target in that AZ, in which case traffic should be routed to another AZ. The solution must leverage a Network Load Balancer (NLB) within a VPC. Option A suggests using a private hosted zone with weighted routing, which does not directly address the requirement of failing over to another AZ when there are no healthy targets in the local AZ. Option B suggests turning off cross-zone load balancing and configuring the front end to perform DNS lookups on the local AZ NLB DNS record. This approach does not inherently provide a failover mechanism to another AZ if there are no healthy targets in the local AZ. Option D suggests enabling sticky sessions, which is unrelated to the requirement of controlling traffic based on the health of targets across AZs. Option C, however, proposes creating a private hosted zone with failover records for each AZ. This setup allows the primary record to point to the local AZ NLB DNS record and the secondary record to the Regional NLB DNS record, effectively meeting the requirement by ensuring traffic stays within the same AZ unless there are no healthy targets, in which case it fails over to another AZ. Therefore, Option C is the correct solution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company has an application with a front end that communicates with backend instances via a Network Load Balancer (NLB) within the same VPC. The application is designed for high availability across two Availability Zones. The company aims to minimize cross-Availability Zone traffic, ensuring that front-end traffic remains within the same Availability Zone unless no healthy targets are available in that zone. If no healthy targets exist in the same Availability Zone, traffic should be routed to the other Availability Zone.
Which solution fulfills these requirements?
A
Create a private hosted zone with weighted routing for each Availability Zone. Point the primary record to the local Availability Zone NLB DNS record. Point the secondary record to the Regional NLB DNS record. Configure the front end of the application to perform DNS lookups on the local private hosted zone records.
B
Turn off cross-zone load balancing on the NLB. Configure the front end of the application to perform DNS lookups on the local Availability Zone NLB DNS record.
C
Create a private hosted zone. Create a failover record for each Availability Zone. For each failover record, point the primary record to the local Availability Zone NLB DNS record and point the secondary record to the Regional NLB DNS record. Configure the front end of the application to perform DNS lookups on the local private hosted zone records.
D
Enable sticky sessions (session affinity) so that the NLB can bind a user’s session to targets in the same Availability Zone.