Locality Based Least Connections

Tim told me in a ticket about “Locality Based Least Connections.” The Wiki page at LVS is in broken English so far as I can tell, or I’m just reading it too literally. RedHat did have a better description on their site…

My question is, will Locality Based Least Connections be the best solution for using servers of various capacities as a load balanced cluster?

Drew Nichols


Locality based least connections will take into account the server that the client IP is currently using in the LB policy. So whereas with just “least connections” the cluster node with the fewest connections gets the traffic (ignoring persistence) with “locality based least connections” the client IP is used as a key as well and affinity for the cluster node currently serving requests for that client IP is used.

Hope that helps, was babbling pretty good there :frowning:


Since we used a shared disk space on this solution, it seems a bit silly to use locality based. Any ETA on weighted load balancing where we can weight our heavier duty servers more heavily than our puny servers?

It can actually be done now using ipvsadm directly (subverting the iworx-cp LB interface). We’ll most likely have this in the next release (or subsequent point release) integrated into the interface. All IWorx-CP does for the LB interface is read ipvsadm’s output directly so using ipvsadm itself won’t hurt a thing if you need the weighted policies now.


Awesome. I’m going to start brushing up on that now. I really love Interworx and am really liking the support you guys are providing. It doesn’t seem to have the complexities of cPanel, but works just as well (better!)

Hello Guys,

How can I apply weighted load balancing?

With what options should I run ipvsadm to get this to work with for example on a cluster manager and two nodes:

Cluster Manger: cp.domain.com
Node1: web0.domain.com
Node2: web1.domain.com


Is it also the case that load balancing for http doesn’t work when I’m not including the cluster manager? Because all the sites get redirected to the first site when I do that.
I’m also wondering if the mysql server should be running on the nodes.

You’ll have to setup these rules manually if you want weighting. The current version doesn’t support weighted LVS rules from the interface but it won’t break things if you set it up manually.