Lesson 12 of 17
7. Load Balancers, Reverse Proxies and API Gateways

Memory card and where the analogy breaks

3 min read+10 XP

The memory card (tear this page out)

#QuestionMemory code
7.1Why a load balancer?One front door, many counters
7.2L4 vs L7?L4 reads the envelope, L7 reads the letter
7.3Algorithms?Take turns, weigh the big ones, pick the shortest queue, or keep families together
7.4Health checks?Three misses and the sign goes up; two passes and it comes down
7.5Sticky sessions?Sticky sessions hide state; they don't remove it
7.6SSL termination?Open the envelope once, at the gate
7.7Redundant load balancer?Every front door needs a spare door
7.8Forward vs reverse proxy?Forward proxy speaks for the clients; reverse proxy speaks for the servers
7.9API gateway?Check ID once at the gate, not at every counter
7.10Global load balancing?Pick the airport first, then the counter

The whole chapter in one line: One front door with a spare, a smart rule for picking counters, and closed signs on the broken ones.

Where the analogy breaks

  • A queue manager handles a few hundred passengers an hour. A load balancer handles thousands of requests a second, so its own speed and redundancy matter enormously.
  • Passengers can see the queues. Requests can't, so the load balancer has to estimate how busy each server is from connection counts and response times.
  • A broken counter is obvious. A sick server isn't: it may answer health checks while failing real requests, or fail checks while serving fine. Health checks are a guess, not the truth.

Quick check

Five questions on this chapter. Pick an answer, then check it.

quiz