using of NLB for HA

0

Hi Team,

In my architecture I will use NLB : API GW => VPCLink => NLB => ECs fargate,

for high availability in the prod environment do I need to spin up 2 NLBs, on each AZ, so my NLB is not a single point of failure?

or is AWS NLB highly available by default? so I need only one NLB in my architecture for the whole region

Thank you.

3 Answers
3

NLB is a highly available load balancer. You can define in which AZs it will be available. See more here.

profile pictureAWS
EXPERT
Uri
answered 2 years ago
profile picture
EXPERT
reviewed 16 days ago
2

Hello,

According to AWS Network Load Balancer official webpage:

Zonal Isolation: The Network Load Balancer is designed for application architectures in a single zone. If something in the Availability Zone fails, we will automatically fail-over to other healthy Availability Zones. While we recommend customers configure the load balancer and targets in multiple AZs for achieving high availability, Network Load Balancer can be enabled in a single Availability Zone to support architectures that require zonal isolation.

So, yes, AWS Network Load Balancer (AWS NLB) is highly available by default and can cover multiple Availability Zones in an AWS region.

profile pictureAWS
answered 2 years ago
profile picture
EXPERT
reviewed 16 days ago
1

You only need one NLB, it's not a single point of failure and operates across AZs.

Note you may or may not want to enable cross-zone load balancing, disabled by default for NLB (unlike ALB).

If you tick this option, each node will spread the load evenly across all instances no matter what AZ they're in. So even with 10 instances in one AZ and 2 instances in another, all 12 instances would get equal load. When cross-zone load balancing is disabled, each load balancer node distributes traffic only across the registered targets in its Availability Zone, so in the above example 50% of load would be spread across 2 instances, and the other 50% across 10 instances.

Pros:

  • If instances in an AZ are lost, you don't need to modify the DNS record for the LB to stop clients targeting that AZ; modifications like this have DNS TTL issues of course.
  • Spreading load more evenly as above.

Cons:

  • Extra latency to cross AZs, milliseconds instead of microseconds.
  • Cost of cross-zone traffic.
EXPERT
answered 2 years ago
profile picture
EXPERT
reviewed 16 days ago

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.

Guidelines for Answering Questions