Bytes and ports vs URLs and headers.
L4 vs L7 Load Balancing: bytes and ports vs urls and headers
move the first decision closer to the user
L4 is cheaper but blind to URLs.
L4 load balancers route by 4-tuple (IP, port). They're fast, simple, and can carry any TCP/UDP. L7 LBs parse application protocols (usually HTTP) and route by host, path, header, cookie. They're richer but slower per packet and tied to the protocol.
L4: NLB, Maglev — line-rate, connection-aware. Best for raw TCP services and very high throughput.
L7: ALB, Envoy, nginx — content-aware. Best for HTTP/HTTPS apps that need path/host routing.
Layered: L4 in front of L7 is common for global front-doors.
Build a global API edge.