Algorithms, Blockchain and Cloud

AWS: When to use Network Load Balancer (NLB) or Application Load Blanacer (ALB) ?


There are two kinds of Load Balancers in AWS: NLB (Network Load Balancer) and ALB (Application Load Balancer).

load-balancer-1024x437 AWS: When to use Network Load Balancer (NLB) or Application Load Blanacer (ALB) ?

load-balancer

For example, if there are two web servers behind a Load Balancer. ALB is the best choice here.

NLB operates on network layer. For web servers you should use ALB which operates on application layer (i.e. you can redirect traffic based on web request). NLB is costly too.

What type of workload are you expecting in your use case? Based on your workload, you can determine which one is best for you. NLB works in Layer 4, meaning that it deals with the raw traffic load and network spikes, aiming to reduce network lag and increase ingress-egress throughput while properly routing high traffic. Also if end-to-end encryption is a requirement, you’re better off using a NLB over ALB, as ALBs cannot provide E2E encryption given their offside of having to store the TLS/SSL keys at different traffic locations of the infrastructure. If none of the above is a solid requirement, ALB is a good choice for you. Generally speaking ALB is often the best choice is majority of the use cases.

ALB will be for web servers while NLB can handle other applications (ex. RDP, SSH, and others). If you need a static public Ip, us NLB or an NLB infront of an ALB.

Finally, Use ALB if you want to balance traffic based on functionality and the expected traffic is not very heavy. Use nlb of the traffic is say in millions or if on prem server are also behind LB.

See also: What does AWS do with unhealthy Instance under Load Balancer?

–EOF (The Ultimate Computing & Technology Blog) —

400 words
Last Post: Teaching Kids Programming - Dynamic Programming Algorithm to Count Bits for N Integers
Next Post: Teaching Kids Programming - Dynamic Programming Algorithms to Compute the Number of Derangement Permutations

The Permanent URL is: AWS: When to use Network Load Balancer (NLB) or Application Load Blanacer (ALB) ? (AMP Version)

Exit mobile version