Interview Prep/Networking/Load Balancers, Proxies & CDNs

What is the difference between L4 and L7 load balancing?

IntermediateConceptLoad Balancers, Proxies & CDNs
Answer

L4 balances connections using IP and port, without parsing payload: very fast, preserves protocols like raw TCP, TLS passthrough and UDP. L7 terminates the connection and understands HTTP, so it can route by host and path, rewrite headers, handle auth, do canaries and retry.

AWS: NLB is L4 (millions of requests per second, static IPs, preserves source IP), ALB is L7 (host/path rules, WebSockets, gRPC, OIDC auth, WAF).

All Networking questions Roadmap: Networking for DevOps

More on Load Balancers, Proxies & CDNs