What is a load balancer?
A load balancer is a component that spreads incoming traffic across multiple servers so no single one gets overwhelmed. If you run several copies of your app, the load balancer decides which server handles each request. This improves reliability, because if one server fails, traffic simply goes to the healthy ones.
What it does
- Distributes requests evenly across servers.
- Detects unhealthy servers and stops sending them traffic.
- Lets you add or remove servers without downtime.
It sits in front of your servers as the single entry point. Users hit the load balancer, and it forwards each request to one of the backend servers, often using a simple rule like round robin.
Connect the load balancer to statelessness. Mentioning that it works best when servers are stateless, so any server can handle any request, ties two concepts together and impresses interviewers.
Common follow up questions
Related interview questions
Want the full Cloud guide?
Read every Cloud concept with notes, diagrams, and code in one place. Track your progress as you go.
Open the Cloud guide All Cloud questions