What is the difference between an ALB, an NLB and a Gateway Load Balancer?
BeginnerScenarioEC2, Auto Scaling and Load Balancing
Answer
Situation read → They operate at different layers for different jobs.
What I'd do →
- ALB is layer 7: host and path routing, redirects, OIDC auth, WebSocket and gRPC
- NLB is layer 4: TCP, UDP, TLS, static IPs per AZ, extreme throughput, PrivateLink backend
- GWLB is layer 3: transparent insertion of firewalls and inspection appliances over GENEVE
- Choose ALB for HTTP microservices, NLB for non-HTTP or fixed IP, GWLB for appliances
Why → Matching layer to need avoids paying for features you do not use.
Interview tip → NLB preserves client IP by default for instance targets.