Networking
ALB vs NLB
Both are Elastic Load Balancing (ELB) load balancers, but ALB operates at Layer 7 (HTTP/HTTPS) with content-aware routing, while NLB operates at Layer 4 (TCP/UDP) for ultra-high-performance routing.
| Aspect | Application Load Balancer(ALB) | Network Load Balancer(NLB) |
|---|---|---|
| Layer | Layer 7 (HTTP/HTTPS) | Layer 4 (TCP/UDP/TLS) |
| Routing | Advanced path/host/header-based routing | Simple port-based routing |
| Performance | Some overhead from L7 processing | Ultra-low latency, handles millions of requests/sec |
| Static IP | Not supported (resolved via DNS) | Can assign an Elastic IP per AZ |
| Source IP preservation | Passed via X-Forwarded-For header | Preserved directly to target (or via proxy protocol) |
| Typical use | Web apps, microservice API routing | Game servers, IoT, financial systems needing low latency or static IPs |
How to Choose
Choose ALB when routing needs to inspect HTTP content (path, headers). Choose NLB for ultra-low-latency, high-throughput TCP/UDP traffic or when clients need a static IP.
Exam Points
- SAA frequently tests "route by path to microservices" → ALB vs "need a static IP / extreme throughput" → NLB
- SAP/SOA cover architectures placing ALB behind NLB (e.g., aggregating access from multiple VPCs via PrivateLink)
Related Service Guides
References
Last updated: 2026-09-06
This page is created from AWS official documentation and reviewed/edited by the operator. See our editorial & quality policy for details.