What is Load Balancing
Traffic distribution between servers
Load Balancing
Load Balancing is a technology for distributing incoming network traffic across multiple servers to ensure high availability and application performance.
Balancing Algorithms
| Algorithm | Description | Use Case | |-----------|-------------|----------| | Round Robin | Sequential distribution | Homogeneous servers | | Weighted Round Robin | Based on server capacity | Varying performance | | Least Connections | To least loaded server | Long connections | | IP Hash | By client IP hash | Session affinity | | Least Response Time | Fastest response | Critical latency |
Types of Load Balancers
- L4 (Transport Layer) — TCP/UDP, fast, no content inspection
- L7 (Application Layer) — HTTP/HTTPS, smart routing by URL/headers
- DNS Load Balancing — distribution at DNS level
- Anycast — geographic load balancing
Popular Solutions
- Nginx, HAProxy — software load balancers
- AWS ALB/NLB — cloud solutions
- F5 BIG-IP — hardware load balancers
- Kubernetes Ingress — for containers
Benefits
- High availability (99.99%)
- Horizontal scaling
- Fault tolerance
- SSL termination distribution