L7 switching support in LVS

Wensong Zhang wensong at linux-vs.org
Sat Oct 9 15:44:46 BST 2004


On Fri, 8 Oct 2004, Jessica Yang wrote:

> Our application require L7 load balancing because we use URL rewriting to
> keep the session info in the requested URLs, like this:
> http://ip/servlet/servletname;jsessionid =*****. Basically, we want the load
> balancer will deliver the requests who have the same jsessionid to the same
> real server. Looking through the LVS document, KTCPVS seems to be able to
> provide L7 load balancing, but I couldn't find any documentation about
> compiling, configuring, features and commands of KTCPVS. Does KTCPVS have
> the feature to distinguish the jsessionid in the requested URL and/or in the
> Cookie header? Does KTCPVS have to be bundled together with IPVS? And what
> is the process to make it work? 

KTCPVS has cookie-injection load balancing feature just as you described.

You can use something like the following
	insmod ktcpvs.o
	insmod ktcpvs_chttp.o
        tcpvsadm -A -i http -s chttp
        tcpvsadm -a -i http -r realserver1:80
        tcpvsadm -a -i http -r realserver2:80
        tcpvsadm -a -i http -r realserver3:80

Anyway, please test it yourself first, use it at your own risk. :)



More information about the lvs-users mailing list