Application Load Balancer vs Network Load Balancer
coreintermediateAn ALB understands HTTP — it can route by URL path or hostname. An NLB operates purely at the connection level, handling extreme throughput and static IPs but with no visibility into the HTTP request at all.
Think of it as
ALB is a receptionist who reads what you're asking for and sends you to the right department. NLB is a turnstile that lets traffic through fast based only on which door you approached, with no idea what you're carrying.
What we're doing: See a routing decision an ALB can make that an NLB structurally cannot.
- 2
- This decision requires reading the HTTP request path — a capability that exists only at Layer 7.
- 3
- A single ALB is routing three logically distinct services from one entry point, based purely on URL structure.
Why this works: An NLB forwards TCP connections based on IP/port alone — it has no concept of an HTTP path or host header to route on, because that information does not exist yet at the transport layer it operates on.
Choosing NLB for a web application that needs path-based routing
Wrong
Better
What you see: Path-based routing to different microservices cannot be configured at all on the load balancer — every listener rule option available is IP/port-based only.
Why: NLB's performance advantage comes precisely from not inspecting the HTTP payload — that same property is what makes content-based routing impossible at that layer, regardless of configuration effort.
- ALB
- Reads the HTTP request — path, host, headers
- Routes by URL structure
- Integrates with Cognito/OIDC auth
- NLB
- Forwards by IP/port alone — no HTTP visibility
- Extreme throughput, ultra-low latency
- Supports static/Elastic IPs
When each load balancer type fits
Together
Remember: ALB is Layer 7 (HTTP-aware, path/host routing) — the default for web apps. NLB is Layer 4 (TCP/UDP, no HTTP visibility) — for extreme throughput, static IPs, or non-HTTP protocols.
See also: listeners rules and target groups · public to private design

