7. NetworkingLoad balancers
Load balancers
A load balancer is a traffic director that sits in front of a group of servers and hands each incoming request to one of them, so no single machine gets overwhelmed and a dead one can be skipped. It can pick servers in a simple rotation (round robin), send work to whichever has the fewest active connections, or hash something like the client’s address so the same user keeps landing on the same server. Some work at the connection level, forwarding traffic by IP and port without looking inside, while others understand HTTP and can route by URL path, header or cookie. It’s also what lets you add or remove servers without users noticing.
In this lesson: Requests flowing to servers under each algorithm, and a consistent-hashing ring.