This is an old revision of the document!
How to Set up LSWS as a Load Balancer
This example uses 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 the 3 Servers are Working
The 3 servers are deliberately set to display different content to distinguish them from each other.
Create a New External App
Create a new external app in the load balancer server. This is can be done either at server level or the vhost level.
Choose Type Web Server
.
Set Name to back1
. This name will be used in a later step. Set Address to the IP of the first backend server.
Since this example has 2 back-end nodes, repeat the previous step to create a 2nd external app with name back2
and its corresponding IP address.
Now create another external app, with Type Load Balancer
, and set Workers to proxy::back1,proxy::back2
(these names were created in the previous steps).
There should be 3 external apps as follows:
Now create a new context with Type Load Balancer
, and in this example, set URI to /
for a full-site proxy.
Since 3 servers are using 3 different domains, now add load.litespeedtech.com
domain to each of the back-end nodes' listeners.
Graceful restart all 3 LSWS instances.
Verify The Load Balancer
This Server Solution vs. LiteSpeed Web ADC
This Web Server load balancing function uses an uncontrollable Round Robin algorithm, rotating between back-end nodes on every access.
If you need an advanced load balancer solution, such as the ability to choose different algorithms (including round-robin, least load, and least sessions), the ability to specify session ID string and session timeout, the ability to insert tracking cookies, and also comes with High Scalability, High Availability IP failover, Cross Datacenter Replication, Cache Data Synchronization and out-of-the box acceleration for Magento and Wordpress round out the feature set to make LiteSpeed Web ADC the best-of-breed solution on the marke, for more information please check out our LiteSpeed Web ADC.