An Application Load Balancer (ALB) is a Layer 7 (HTTP/HTTPS) load balancer that intelligently routes traffic based on request details. Unlike a Classic Load Balancer (CLB), which operates at multiple layers, ALB is optimized for web applications and microservices.
example.com/users vs. example.com/posts.one.example.com vs. other.example.com.example.com/reserves?id=123&order=false.ALB is ideal for microservices and containerized applications because it allows traffic distribution to multiple backends, even if they are running on the same EC2 instance (via dynamic port mapping in Amazon ECS).
| Feature | ALB | CLB |
|---|---|---|
| Layer | Layer 7 (HTTP/HTTPS) | Layer 4 & 7 (TCP, HTTP, HTTPS) |
| Path-Based Routing | ✅ | ❌ |
| Host-Based Routing | ✅ | ❌ |
| WebSockets & HTTP/2 | ✅ | ❌ |
| Multi-App Support (1 Load Balancer) | ✅ | ❌ (1 per app) |
| AWS Service Integrations | ✅ (ECS, Lambda, IP targets) | Limited |