Load Balancing Algorithms
Quick Reference: Consistent Hashing | Rate Limiting
Quick Reference
| Algorithm | Type | Use Case | Pros | Cons |
|---|---|---|---|---|
| Round Robin | Stateless | Equal server capacity | Simple, fair | Ignores load |
| Least Connections | Stateful | Varying request times | Handles load | Tracks state |
| Weighted Round Robin | Stateless | Unequal capacity | Considers capacity | Static weights |
| IP Hash | Stateless | Session affinity | Sticky sessions | Uneven distribution |
| Least Response Time | Stateful | Performance priority | Fastest servers | Overhead |
Clear Definition
Load Balancing distributes incoming requests across multiple servers to improve performance, availability, and scalability. Algorithms determine how requests are routed to backend servers.
š” Key Insight: Choose algorithm based on server characteristics, session requirements, and performance needs.
Core Concepts
Stateless Algorithms
Round Robin: Distribute requests sequentially
Weighted Round Robin: Distribute based on server capacity
IP Hash: Route based on client IP (session affinity)
Stateful Algorithms
Least Connections: Route to server with fewest active connections
Least Response Time: Route to fastest responding server
Best Practices
- Health Checks: Monitor server health
- Failover: Remove unhealthy servers
- Session Affinity: Use when needed (sticky sessions)
- Monitor: Track load distribution
Quick Reference Summary
Load Balancing: Distribute requests across servers for performance and availability.
Algorithms: Round-robin (simple), Least connections (load-aware), Weighted (capacity-aware).
Next Topic: Consistent Hashing ā
Back to: Step 6 Overview | Main Index