⚖️ System Design · System Building Blocks
Load Balancing
Distribute traffic across multiple servers.
One server should not receive all requests when several can share the work.
A load balancer sends users across three application servers.
💡 Like a supermarket opening more checkout lanes at rush hour so no single queue gets huge.
💡 Why it matters
A single server has limits, and when it is overwhelmed everyone's requests slow down or fail. A load balancer spreads requests so the system can handle more users and keep working if one server dies. It is the simple move that turns one fragile machine into a resilient group.
🛠️ How to achieve it
⚠️ Signs of trouble
- •All traffic hits one server while others sit idle.
- •The whole system goes down when a single server fails.
- •Response times spike sharply during busy periods.
- •Adding capacity means replacing one machine with a bigger one.
🎯 Quick check
Score: 0/3Three questions to test the idea.
1. What does a load balancer do?
Answer: Spreads requests across several servers
A load balancer distributes incoming traffic so no single server is overwhelmed.
2. Why do balanced servers need to be stateless?
Answer: So any server can handle any request without breaking the user
If state lives on one server, a user sent to a different server loses it; stateless servers are interchangeable.
3. How should you add capacity behind a load balancer?
Answer: Add more servers to the pool (scale out)
Scaling out adds interchangeable servers so the balancer has more capacity to share load across.
