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 réponses
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
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois
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
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois
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
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions