The Desi Architect
Notes / Building Blocks / Load Balancers and the Hash Ring
Track 2 · Building Blocks

Load Balancers and the Hash Ring

One front door in front of many servers sounds simple until a node dies, a new one joins cold, or a cache loses most of its keys in one minute. This page covers L4 versus L7, the balancing algorithms, health checks, the hash ring, and how to keep the balancer itself from being the thing that fails.

Guide20 min read1 interactive
On this page
  1. The night the menu cache lost most of its keys
  2. The simple version
  3. L4 versus L7
  4. How the balancer picks a server
  5. Why modulo hashing broke our cache
  6. The hash ring
  7. See it happen
  8. Keeping the balancer itself alive
  9. When to use what
  10. Common traps