Load balancing
Studies in this cluster, in series order. Each one keeps its own URL.
Networking
TCP, TLS, load balancers, and why the p99 lives in the handshake.
Load balancing
6 studies- 1.Load Balancing — L4 vs L7, Algorithms & Health ChecksWhat an LB owns (VIP, backends, health, drain); L4 vs L7 matrix; algorithm zoo; health/drain; global LB; sticky vs stateless — comparative tradeoffs for senior interviews.
- 2.L4 vs L7 Proxies — Connection Routing, TLS Termination & Protocol AwarenessTCP/UDP passthrough vs HTTP/gRPC routing; TLS terminate vs passthrough; SNI; HTTP/2 multiplexing implications; when L4 is enough; gRPC/WebSocket affinity needs.
- 3.Balancing Algorithms — Round-Robin, Least-Conn, Maglev & Power-of-Two ChoicesRR, WRR, least-conn, least-time, Maglev, P2C + bounded load; skew/hot-key behavior; when each wins.
- 4.Health Checks, Slow Start & Connection DrainingActive vs passive health; HTTP vs TCP checks; thresholds; slow start after recover; connection draining / deregistration delay; fail-open vs fail-closed.
- 5.Global Load Balancing — DNS, Anycast & Multi-Region FailoverDNS geo/latency, Anycast, health-aware DNS; active-active vs active-passive; split-brain; RTO vs RPO confusion.
- 6.Sticky Sessions vs Stateless — Affinity Tradeoffs & Consistent Hashing at the EdgeCookie affinity and source-IP hash hurt scale/failover; prefer JWT/session store; when sticky is forced (WebSocket); consistent hash for cache locality without sticky sessions.