- Load balancers distribute incoming traffic across multiple servers.
- Prevents any single server from being overwhelmed.
- Improves availability, performance, and fault tolerance.
- Types:
- Layer 4 (Transport): Works on TCP/UDP level (faster, less intelligent).
- Layer 7 (Application): Works on HTTP/HTTPS, can inspect headers and routes.
- Common algorithms:
- Round Robin
- Least Connections
- IP Hashing
- Can be hardware-based or software-based (e.g., NGINX, HAProxy, AWS ELB).
- Supports health checks and automatic failover.