Skip to content

Possible wrong question on SkillBuilder Trivia! | Load Balancer

0

As a part of recent AWS Trivia quiz at an event, One of the question was disputed by a participant!

Question: Which statement regarding auto scaling and load balancing is true?

A) An Auto Scaling group can use only one Availability Zone at a time.

B) Auto Scaling groups must be used independently of load balancers.

C) A load balancer will route traffic to all targets, no matter which Availability Zone the targets are in. <--- This is the listed correct answer.

D) Load balancers must use the same security group as the instances behind it.

My understanding: By default, a load balancer WON'T route traffic to all targets and it does matter in which AZ targets are in.

There are 3 types of load balancers that AWS actively offers today! NLB, ALB and GWLB!

Among them, Both NLB and GWLB has cross zone load balancing OFF by default, and follow AZ affinity rule. However, ALB has cross zone load balancing ON by default.

Ask: So we can't generalize to state that a load balancer will route traffic to targets in all AZ. Does it make this Trivia quiz wrong and should be removed from Skill-builder Trivia?

Supporting documentation: https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/using-gwlb-with-tg-for-cns.html

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-subnets.html

1 Answer
0

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

answered a year ago

AWS
EXPERT

reviewed 9 months ago

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

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.