Last Minute Notes
  • Github
  • Docs
  • Learn
    @sayanstwt
Lessons
0/37 done
  • DNS Resolution
  • Content Delivery Networks
  • Load Balancing
  • Gateways, Proxies & Meshes
  • Caching
  • Rate Limiting
Learn/System Design/Traffic & Edge

Load Balancing

8 min Beginner 8 steps

Spread traffic across servers and route around the ones that fail.

Servers
1
Load per server
100%
If it dies
site down
ClientClientServerthe only oneCPU 97%Clientone server: no headroom, no redundancy
request response data
In this lessonStep 1 of 8
  1. The problem
  2. Add a balancer
  3. Round robin
  4. Least conns
  5. Health checks
  6. L4 vs L7
  7. No SPOF
  8. Recap
Step 1 / 8problem

One server takes every request

All clients talk to a single server. When traffic grows its CPU pins at the limit and every request slows down.

Worse, if that box dies the whole site is gone.

Key idea

Scaling out means many servers, and many servers need something in front that hands out the work.

←→ step·R replay·Space pause

You'll learn

  • Why one server is both a bottleneck and a single point of failure
  • Round robin vs least connections
  • How health checks route around failures
  • L4 vs L7, and keeping the balancer itself available
Read the full notesHLD Building Blocks, 4