SDE & MLE Prep

Load Balancing

  • L4 (TCP/UDP, fast, no content awareness) vs L7 (HTTP: route by path/header/cookie, TLS termination, retries).
  • Algorithms: round-robin, weighted, least connections, latency-based, consistent hashing (sticky by key for caches).
  • Health checks remove dead nodes; use active-passive or active-active LB pairs (or DNS / anycast) so the LB isn't a SPOF.
  • Global: GeoDNS / anycast routes users to the nearest region.