Files
system-design-101/data/guides/top-6-load-balancing-algorithms.md
Kamran Ahmed ee4b7305a2 Adds ByteByteGo guides and links (#106)
This PR adds all the guides from [Visual
Guides](https://bytebytego.com/guides/) section on bytebytego to the
repository with proper links.

- [x] Markdown files for guides and categories are placed inside
`data/guides` and `data/categories`
- [x] Guide links in readme are auto-generated using
`scripts/readme.ts`. Everytime you run the script `npm run
update-readme`, it reads the categories and guides from the above
mentioned folders, generate production links for guides and categories
and populate the table of content in the readme. This ensures that any
future guides and categories will automatically get added to the readme.
- [x] Sorting inside the readme matches the actual category and guides
sorting on production
2025-03-31 22:16:44 -07:00

45 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Top 6 Load Balancing Algorithms"
description: "Explore the top 6 load balancing algorithms in detail."
image: "https://assets.bytebytego.com/diagrams/0251-lb-algorithms.png"
createdAt: "2024-03-05"
draft: false
categories:
- software-development
tags:
- "Load Balancing"
- "Algorithms"
---
![](https://assets.bytebytego.com/diagrams/0251-lb-algorithms.png)
## Top 6 Load Balancing Algorithms
* **Static Algorithms**
* Round robin
The client requests are sent to different service instances in sequential order. The services are usually required to be stateless.
* Sticky round-robin
This is an improvement of the round-robin algorithm. If Alices first request goes to service A, the following requests go to service A as well.
* Weighted round-robin
The admin can specify the weight for each service. The ones with a higher weight handle more requests than others.
* Hash
This algorithm applies a hash function on the incoming requests IP or URL. The requests are routed to relevant instances based on the hash function result.
* **Dynamic Algorithms**
* Least connections
A new request is sent to the service instance with the least concurrent connections.
* Least response time
A new request is sent to the service instance with the fastest response time.