Load Balancers
One server can only handle so many requests. A load balancer stands in front of many servers and sends each request to a server that can take it. In this lesson you learn how it chooses, and what happens when a server dies.
New words
- Load balancer
- A machine that shares incoming requests between many servers.
- Round robin
- Send requests to servers one by one, in a fixed order.
- Least connections
- Send the next request to the server with the fewest running requests.
- Health check
- A small test the balancer runs to see if a server is alive.
- Sticky session
- A rule that keeps sending one user to the same server.
- Single point of failure
- One part that, if it breaks, stops the whole system.
What you will learn
- The problem, and what a load balancer does
- How does it choose a server?
- Health checks: do not send people to a closed counter
- Sticky sessions, and a backup for the balancer
- Try it: send requests to 4 servers
- Trade-offs
- In a real system
- Interview tip
- Key takeaways
10 quiz questions at the end.
The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.