A Load Balancer (LB) is the Traffic Cop of your infrastructure. It distributes incoming traffic across multiple healthy servers so no single server gets overwhelmed.
If you run a website on one server and it crashes, your site is down. If you run it on 3 servers, how does the user know which one to call? The LB gives a single entry point (DNS name) and routes traffic behind the scenes.
The LB constantly pings your servers ("Are you there?"). If a server fails to reply (e.g., CPU overload or crash), the LB stops sending traffic to it until it recovers.
Round Robin: Server 1, then 2, then 3, repeat.
Least Connections: Send to the server with the fewest active users.
IP Hash: User A always goes to Server 1 (Sticky).
Layer 7 (HTTP/HTTPS)
Smart. It looks inside the packet. It can route `/api` to Server A and `/images` to Server B. It handles SSL termination and is best for websites/APIs.
Layer 4 (TCP/UDP)
Fast. It doesn't look inside. It just forwards packets at lightning speed. It handles millions of requests per second. Used for gaming or extreme performance.