Load Balancer Setup in AWS: Ensuring Traffic Distribution Across Availability Zones

Load Balancer Configuration for Distributed Traffic across Availability Zones

Question

You've set up a Load Balancer in AWS.

You've set up EC2 Instances in multiple availability zones.

You also ensure the load balancer has these availability zones added to it.

Which of the following will ensure that traffic gets distributed across the registered targets in all enabled Availability Zones?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: B.

This is given in the AWS Documentation.

The nodes for your load balancer distribute requests from clients to registered targets.

When cross-zone load balancing is enabled, each load balancer node distributes traffic across the registered targets in all enabled Availability Zones.

When cross-zone load balancing is disabled, each load balancer node distributes traffic across the registered targets in its Availability Zone only.

Option A is incorrect since this binds a user's session to a specific instance.

Option C is incorrect since this is used to carry connection information from the source requesting the connection to the destination for which the connection was requested.

Option D is incorrect since this is used to stop sending requests to instances that are de-registering or unhealthy.

For more information on how load balancing works, please refer to the below URL-

https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html

The correct answer to this question is B. Enable cross-zone load balancing.

When you configure a load balancer in AWS, you can choose the availability zones in which it will distribute traffic. By default, a load balancer distributes traffic only to the instances within the same availability zone as the incoming request. This means that if you have EC2 instances in multiple availability zones and you want the load balancer to distribute traffic across all of them, you need to enable cross-zone load balancing.

Cross-zone load balancing allows the load balancer to distribute traffic evenly across all the enabled availability zones. When you enable cross-zone load balancing, the load balancer will distribute traffic to all registered targets in all enabled availability zones, regardless of the zone in which the request was received. This ensures that your application can handle increased traffic loads and provides better fault tolerance in case an entire availability zone becomes unavailable.

Sticky sessions (answer A) are a feature that allows a user to be directed to the same instance for the duration of their session. This can be useful for certain applications, but it does not ensure that traffic gets distributed across all enabled availability zones.

The proxy protocol (answer C) is a protocol that allows the load balancer to forward the client's connection information to the target instances. This is useful in certain scenarios, but it does not ensure that traffic gets distributed across all enabled availability zones.

Connection draining (answer D) is a feature that ensures that in-flight requests are completed before an instance is terminated or taken out of service. This can be useful for maintaining availability during updates or other maintenance activities, but it does not ensure that traffic gets distributed across all enabled availability zones.