TechBlog
system-design

Load Balancing — Algorithms and Patterns

Load balancers are the backbone of scalable systems. Learn how they work, the algorithms they use, and the patterns you'll encounter in real architectures.

3 min read

What is a Load Balancer?

A load balancer distributes incoming traffic across multiple servers — solving scalability and availability simultaneously.


Load Balancing Algorithms

Round Robin

Request 1 → Server 1
Request 2 → Server 2
Request 3 → Server 3
Request 4 → Server 1 (repeats)

Best for: identical servers, equal-cost requests

Least Connections

Server 1: 100 active connections
Server 2: 20 active connections  ← next request goes here
Server 3: 80 active connections

Best for: long-lived connections, variable request cost


Layer 4 vs Layer 7


Health Checks


Session Persistence


Key Takeaway