Load Balancing
Learning Focus
By the end of this lesson you will understand OpenLiteSpeed's load balancing capabilities for backend servers.
What Load Balancing Does
Load balancing distributes incoming requests across multiple backend servers, improving:
- Availability — one backend can fail without taking the site down
- Throughput — more backends handle more requests
- Scalability — add backends as traffic grows
Configuration in WebAdmin
- Define multiple External App entries (e.g.,
backend1,backend2) - Create a Load Balancer external app that references them
- Create a Proxy Context pointing to the load balancer
Load Balancing Methods
| Method | How It Works |
|---|---|
| Round Robin | Alternates between backends equally |
| Least Load | Sends to the backend with fewest active connections |
Key Takeaways
- Use load balancing when you have multiple backend instances for the same application.
- Round robin is the simplest and works well for stateless applications.
- For session-based apps, consider session persistence or session-free architecture.
What's Next
- Return to the Advanced Features module for the complete overview.