System Design

L4 vs L7 Load Balancing Architecture

System Design diagram · made in Skemio

Network diagram comparing L4 Transport balancer routing raw TCP packets to an L7 Application proxy, which terminates TLS and routes to microservices by URL path.
Network diagram comparing L4 Transport balancer routing raw TCP packets to an L7 Application proxy, which terminates TLS and routes to microservices by URL path.

What it shows

  • L4 forwards IP/port packets at the transport layer with ultra-low latency
  • L7 terminates TLS and inspects HTTP headers, cookies, and path routes
  • Layering L4 in front of an L7 cluster delivers throughput and flexibility

The takeaway

Use L4 for wire-speed packet dispatch; use L7 for microservice path routing and auth checks.

More system design diagrams