This is an old revision of the document!
How to set up the server 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.
Verify 3 Servers Are Working
Create New External App
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.
Verify The Load Balancer
Access it to verify if everything is working as expect.
Load Balancer will use uncontrollable Round Robin algorithm, rotating between back-end nodes on every access.
If you need an advanced load balancer solution , please check out our LiteSpeed ADC