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 個答案
3

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

profile pictureAWS
專家
Uri
已回答 2 年前
profile picture
專家
已審閱 1 個月前
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
已回答 2 年前
profile picture
專家
已審閱 1 個月前
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.
專家
已回答 2 年前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南