Beginner Topic 14 of 51 Distributed Systems & Cloud
Load Balancing Algorithms
Policies like round robin and least connections.
How it works
Load balancing algorithms decide which backend receives each request. Round robin cycles through servers, weighted round robin accounts for capacity, least connections picks the server with the fewest active connections, least response time uses measured latency, IP or consistent hashing sends the same client or key to the same server for affinity and cache locality, and power-of-two-choices picks two at random and chooses the less loaded. Health checks remove failed servers, and global balancing uses DNS or anycast to choose regions.
Where it is used
Web servers, API gateways, databases, caches and microservice meshes use these algorithms in hardware appliances, NGINX, HAProxy, Envoy and cloud load balancers.
Common pitfall
Round robin ignores request cost and server differences, causing uneven load. Sticky sessions unbalance traffic and hamper scaling. Stale health information sends traffic to dead nodes. Thundering herds appear when a server returns. Choose by workload, prefer stateless services, combine with timeouts and retries and observe per-backend metrics.
Where it fits in the course
Load Balancing Algorithms is topic 14 of 51 in Distributed Systems & Cloud, rated Beginner. It follows Object Storage. The next topic is Caching Layers.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Distributed Systems & Cloud quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Distributed Systems & Cloud quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Load Balancing Algorithms?
Where do people use Load Balancing Algorithms?
What is the most common mistake with Load Balancing Algorithms?
What should I learn before this topic?
How can I practice it?
Is Load Balancing Algorithms hard to learn?
How long does it take to learn Load Balancing Algorithms?
Which topics are related to Load Balancing Algorithms?
What should I study after Load Balancing Algorithms?
Related topics
- Object Storage (Distributed Systems & Cloud)
- Caching Layers (Distributed Systems & Cloud)
- Virtual Machines in Cloud (Distributed Systems & Cloud)
- Fault Tolerance (Distributed Systems & Cloud)
- Load Balancing in Parallel Programs (Concurrency & Parallelism)
- Line Drawing Algorithms (Graphics, Vision & Media)
- Greedy Algorithms (Algorithms)