On 7/5/2010 7:09 AM, Alan O'Ceallaigh wrote: > Hi all, > > I'm new to the list and to LVS. > > I'm attempting to configure an LVS director to load balance instances of > JBoss in the following configuration: > > For a service that we provide, there are a total of two to four JBoss nodes > per customer. We have webservers which are accessible to the customer, > which need to communicate with the JBoss nodes via the load balancer which > will use the Weighted Round-Robin algorithm to distribute load. Session > persistence will be 1500 seconds as at this stage the application does not > share it's state across nodes, and there is a login timeout of 1500 seconds. > > Are you running dedicated web servers in front of the JBoss instances, such as apache? If so, you can gain greater persistence by using mod_proxy w/ mod_proxy_http and setting the JSESSIONID to ensure users are always directed to the proper JBoss backend. It's a much better solution than setting a 1500 second timeout.
Obviously remember to put the log configuration and DocumentRoot into the VirtualHost config. Example entry in httpd.conf: <VirtualHost 192.168.1.5:80> ServerName some.host.com ProxyPreserveHost On ProxyPass / balancer://service-lb/ stickysession=JSESSIONID <Proxy balancer://service-lb> BalancerMember http://jboss-server1.host.com:9001 route=jboss-server1 keepalive=Off loadfactor=100 ttl=120 max=64 smax=4 retry=60 timeout=300 BalancerMember http://jboss-server2.host.com:9001 route=jboss-server2 keepalive=Off loadfactor=1 ttl=120 max=64 smax=4 retry=60 timeout=300 </Proxy> </VirtualHost> > My issue is that when configuring LVS to load balance the JBoss instances, I > do not know what string it is appropriate to send, what protocol I should > use, and what I should expect in return. Several hours of Googling and > consultation with our development team have failed to turn up any likely > candidates. I would like to avoid changing the JBoss configuration if > possible, though if this is the only way to achieve the result, then I am > prepared to look at whatever options are available. > > I'd be grateful for any suggestions. > > Using the suggestion above (apache acting as a proxy to JBoss using mod_proxy_http), all one needs to do is configure an http check and create a generic check.htm with an embedded string on the page that LVS will check for. Example: # Virtual Server for HTTP virtual=192.168.1.5:80 real=192.168.7.4:80 real=192.168.7.5:80 service=http request="check.htm" receive="Test Page" scheduler=rr protocol=tcp checktype=negotiate Have this page served by the apache web server on the real servers so that if the director machine goes to http://192.168.7.4:80/check.htm, it finds a page with a string containing "Test Page". > Regards, > > > Alan > _______________________________________________ > Please read the documentation before posting - it's available at: > http://www.linuxvirtualserver.org/ > > LinuxVirtualServer.org mailing list - [email protected] > Send requests to [email protected] > or go to http://lists.graemef.net/mailman/listinfo/lvs-users > Ryan Manikowski _______________________________________________ Please read the documentation before posting - it's available at: http://www.linuxvirtualserver.org/ LinuxVirtualServer.org mailing list - [email protected] Send requests to [email protected] or go to http://lists.graemef.net/mailman/listinfo/lvs-users
