LearnViz CompSci
Home / Learn / Distributed Systems & Cloud / Load Balancing Algorithms

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

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. 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?
Policies like round robin and least connections. It belongs to Distributed Systems & Cloud and is a beginner-level topic.
Where do people use Load Balancing Algorithms?
Web servers, API gateways, databases, caches and microservice meshes use these algorithms in hardware appliances, NGINX, HAProxy, Envoy and cloud load balancers.
What is the most common mistake with Load Balancing Algorithms?
Round robin ignores request cost and server differences, causing uneven load.
What should I learn before this topic?
Start with Object Storage, the topic just before it in Distributed Systems & Cloud.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Distributed Systems & Cloud quiz.
Is Load Balancing Algorithms hard to learn?
It is a Beginner topic, so it works as an entry point. If the terms are new, read the explanation twice and try the visualizer before the quiz.
How long does it take to learn Load Balancing Algorithms?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Load Balancing Algorithms?
Object Storage, Caching Layers, Virtual Machines in Cloud are closely connected. The full list is in the related topics section of this page.
What should I study after Load Balancing Algorithms?
Continue with Caching Layers, the next topic in Distributed Systems & Cloud.

Related topics