AWS application load balancer vs network load balancer

A load balancer automatically directs incoming requests to healthy targets based on the rules defined. Load balancers in Amazon Web Services (AWS) are typically used in front of Elastic Compute Cloud (EC2) instances, containers, and IP addresses to manage incoming requests.

Load balancers distribute workload to multiple compute resources, avoiding overloading a single compute, thus ensuring high availability and fault tolerance.

Elastic load balancer overview diagram
Elastic load balancer overview diagram

The number of compute resources behind the load balancer can be changed as per needs without disrupting the availability of the application. There are different types of elastic load balancers available in AWS; standard types are:

  • Application load balancer (ALB) routes the requests based on HTTP/HTTPS requests' content, such as URL paths or host headers. It is ideal for complex routing and managing web applications, microservices, etc.

  • Network load balancer (NLB) routes requests based on IP protocol data without inspecting the content, providing faster routing handling millions of request per second. It is suitable for high-performance and low-latency applications.

Let's analyze the difference between the two.

ALB vs NLB

ALB

NLB

ALB works at the application layer (Layer 7) of the OSI model.

NLB works at the OSI model's transport layer (Layer 4). It routes traffic based on IP protocol data, such as TCP, UDP, or TLS.

Supports HTTP, HTTPS, and WebSockets. It can also do content-based routing.

Supports TCP, UDP, and TLS. It is suitable for high throughput, low-latency scenarios.

Distributes traffic evenly across all registered targets in all availability zones.

Does not perform cross-zone load balancing, meaning traffic is distributed evenly only within the availability zone where the NLB resides.

Supports session affinity (sticky sessions) at the application layer.

Does not support sticky sessions, as it operates at the transport layer.

Supports path-based routing, allowing you to route traffic based on the path in the URL.

It does not support path-based routing, as it operates at the transport layer and does not inspect the traffic content.

Test Your Knowledge:

1

Which load balancer is optimised to provide high throughput and low latency?

A)

ALB

B)

NLB

Question 1 of 30 attempted

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved