- Newest
- Most votes
- Most comments
You're correct that the trivia question's "correct" answer is not entirely accurate. The statement "A load balancer will route traffic to all targets, no matter which Availability Zone the targets are in" is not universally true across all AWS load balancer types.
Here's the accurate breakdown:
-
For Application Load Balancers (ALB), cross-zone load balancing is always enabled at the load balancer level (though it can be disabled at the target group level). This means ALBs will route traffic to targets across all enabled Availability Zones by default.
-
For Network Load Balancers (NLB) and Gateway Load Balancers (GWLB), cross-zone load balancing is disabled by default. When cross-zone load balancing is disabled, each load balancer node only distributes traffic to targets within its own Availability Zone.
-
For Classic Load Balancers (which are legacy), the default setting depends on how you create the load balancer - it's disabled by default when using API or CLI, but enabled by default when using the AWS Management Console.
When cross-zone load balancing is disabled, a load balancer node in one AZ will not route traffic to targets in another AZ. This means the location of targets absolutely does matter.
The trivia question's "correct" answer overgeneralizes and doesn't account for these important distinctions between load balancer types and their default configurations. The question should either be removed or modified to be more precise about which load balancer type it's referring to and under what configuration.
Sources
How Elastic Load Balancing works - Elastic Load Balancing
Target group in a different AZ with disabled Cross Zone Load Balancing | AWS re:Post
AWS NLB AZ DNS affinity | AWS re:Post
Relevant content
asked a year ago
asked 3 years ago

Yes. The question need to be clear on type of load balancer and Target group settings.