System Design · Building Blocks · Topic 1 of 5
Load Balancing
4 questions.
Your progress0%
- 1st Visit
- 0/4
- 2nd Visit
- 0/4
- Revise
- 0/4
Overview
A load balancer sits in front of a group of servers and distributes incoming requests among them, so that no single server is overloaded and failed servers stop receiving traffic. It is usually the first component drawn in a high-level design, and it is what makes horizontal scaling of stateless services possible. This topic covers what load balancers do, the algorithms they use, the difference between transport-level and application-level balancing, and consistent hashing, which routes requests to the servers that own specific data. Mention load balancing whenever a design runs more than one instance of a service, and remember that the load balancer itself must be redundant.
Questions
| # | Problem | Platform | Difficulty | Open | 1st1st Visit | 2nd2nd Visit | RevRevise |
|---|---|---|---|---|---|---|---|
| 1 | What is a load balancer, and why is it used? | Concept | Easy | Read the answer to What is a load balancer, and why is it used? | |||
| 2 | What are the common load-balancing algorithms, and when would you use each? | Concept | Medium | Read the answer to What are the common load-balancing algorithms, and when would you use each? | |||
| 3 | What is the difference between Layer 4 and Layer 7 load balancing? | Concept | Medium | Read the answer to What is the difference between Layer 4 and Layer 7 load balancing? | |||
| 4 | What is consistent hashing, and why is it used? | Concept | Hard | Read the answer to What is consistent hashing, and why is it used? |