1.Application Load Balancer vs Network Load Balancer
An 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.
Key features
- ALB operates at Layer 7 (application/HTTP) — can route by path, host, headers
- NLB operates at Layer 4 (transport/TCP-UDP) — extremely high throughput, low latency
- NLB supports static IP addresses and Elastic IPs per AZ; ALB does not
- ALB is the default choice for HTTP/HTTPS web applications and microservices
- NLB fits extreme performance needs, non-HTTP protocols, or when a fixed IP is required
When each load balancer type fits
- 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
Command
ALB: Layer 7 (HTTP) — path/host routing, content-aware
NLB: Layer 4 (TCP/UDP) — extreme throughput, static IP, protocol-agnosticALB 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.