Skip to content
STUB

Load Balancing

The pattern: distribute incoming requests across N healthy backends. L4 (TCP-level) is fast and protocol-agnostic. L7 (HTTP-level) is content-aware (route by host, path, header) but more expensive. Health checks remove unhealthy backends; algorithms (round-robin, least-connections, IP-hash, weighted) trade simplicity for fairness.

The trade-off: smarts vs. cost. L4 LBs can do millions of QPS at minimal CPU. L7 LBs add useful features (TLS termination, path routing, header manipulation, retry policies, rate limiting) but cost CPU. Service meshes push L7 LB to the sidecar/ambient — every service-to-service call is L7-routed.

Deepens in Year 1 Phase 7: Kubernetes + GitOps — K8s Service + Ingress + kube-proxy iptables/IPVS rules are the concrete example. Earlier framing lands in Year 1 Phase 2: Networking, and load-balancer telemetry deepens again in Year 3 Phase 14: Observability + eBPF.