This is an old revision of the document!


How to set up LSWS as load balancer

This example use 3 servers:

back1.litespeedtech.com with IP *.*.*.151
back2.litespeedtech.com with IP *.*.*.152
load.litespeedtech.com  with IP *.*.*.153

back1 and back2 will act as 2 back-end nodes, and load will act as load balancer.

3 servers are deliberately set to display different content to distinguish them from each other.

Create a new external app in load balancer server, this is can be done either at server level or vhost level.

Choose type Web Server

Set name to back1 , this name will be used in later step, and set IP to backend 1.

Since this example has 2 back-end nodes , repeat previous step to create 2rd external app with name back2 and its corresponding IP address.

Now create another external app , with type Load Balancer, and set workers to back1 and back2 (these names are created in previous step)

Finally, there should be 3 external apps as following:

Now create a new context with type Load Balancer, and in this example, set URI to / for full-site proxy.

Since 3 servers are using 3 different domains, now add load.litespeedtech.com domain to back-end nodes' listener.

Repeat this step on back2

Graceful restart all 3 LSWS instances.

Access it to verify if everything is working as expect.

Web Server load balancing function will only use uncontrollable Round Robin algorithm, rotating between back-end nodes on every access.

If you need an advanced load balancer solution, such as choosing different algorithms, including round-robin, least load, and least sessions, specifying session ID string and session timeout, inserting tracking cookie etc, please check out our LiteSpeed ADC

  • Admin
  • Last modified: 2018/05/31 17:57
  • by Jackson Zhang