Skip to main content

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​

  1. Define multiple External App entries (e.g., backend1, backend2)
  2. Create a Load Balancer external app that references them
  3. Create a Proxy Context pointing to the load balancer

Load Balancing Methods​

MethodHow It Works
Round RobinAlternates between backends equally
Least LoadSends 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​