[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [JBoss-user] Strange load balancing behavior with mod_jk2
From:       Björn_Weis <bjoern_weis () web ! de>
Date:       2003-12-30 11:12:59
Message-ID: 3FF15DBB.30604 () web ! de
[Download RAW message or body]

Hallo,

I run Apache2 with mod_jk2 and 3 JBoss 3.2.3 with the included Tomcat on 
Suse 8.2.

When requesting to the jsp-pages in the JBoss 3.2.3 the load balancing 
behavior is
not round robin. It seems to me that every time the benchmark send 
requests to the
Apache2 the mod_jk2 makes a new slot and in this slot the requests are 
distributed
round robin (when sometimes a slot is used twice). This is only with 
sticky-session
pages. With other pages load balancing works fine. When I try that 
manual I can
verify it (I use diffrent browsers on diffrent machines, so that I get 
allways new cockies),
so it does not lie on the benchmark application.

My config files:
jboss-service.xml from the tomcat:
...
<Engine jvmRoute="${jboss.bind.address}:8009" name="MainEngine" 
defaultHost="localhost">
...
<!-- A AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
           address="${jboss.bind.address}" port="8009" minProcessors="5" 
maxProcessors="75"
           enableLookups="true" redirectPort="8443"
           acceptCount="10" debug="0" connectionTimeout="100000"
           useURIValidationHack="false"
           protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
...
<attribute name="CatalinaHome">${jboss.server.home.dir}/tomcat</attribute>
<attribute name="CatalinaBase">${jboss.server.home.dir}/tomcat</attribute>

jk2.properties in the conf path I set in the jboss-service.xml 
(${jboss.server.home.dir}/tomcat/conf):

# The jk2.properties file should be in the directory 
?$TOMCAT_HOME/conf?. This file contains all of the JK2 configuration 
information. Here we will set up the shared memory directive. This 
directive is necessary for Apache and Tomcat to communicate. A good 
place to have the file is the ?$APACHE_HOME/logs? directory. The file 
can be named anything but the convention is ?jk2.shm?.
# TODO: What to do in case Tomcat and Apache reside on different machines.
#Shared memory directive
shm.file=pathToApache/logs/jk2.shm

workers2.properties in the apache conf directory:

[logger]
level=DEBUG

[config:]
file=${serverRoot}/conf/workers2.properties
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
#[logger.file:0]
#level=DEBUG
#file=${serverRoot}/logs/jk2.log

[shm:]
info=Scoreboard. Required for reconfiguration and status with 
multiprocess servers
file=${serverRoot}/logs/jk2.shm
size=1024
debug=0
disabled=0

[workerEnv:]
info=Global server options
timing=1
debug=0
# Default Native Logger (apache2 or win32 )
# can be overriden to a file logger, useful
# when tracing win32 related issues
#logger=logger.file:0

[channel.socket:host1:8009]
info=Ajp13 host1
debug=0
lb_factor=1
group=lb
tomcatId=host1:8009
disabled=0

[channel.socket:host2:8009]
info=Ajp13 host2
debug=0
lb_factor=1
group=lb
tomcatId=host2:8009
disabled=0

[channel.socket:host3:8009]
info=Ajp13 host3
debug=0
lb_factor=1
group=lb
tomcatId=host3:8009
disabled=0

[status:]
info=Status worker, displays runtime informations

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:/MyApp/*]
info=load balancer uri
group=lb
debug=0

httpd.conf in the apache conf directory:
...
#
# Load mod_jk
#
LoadModule jk2_module modules/mod_jk2.so

Thats my configuration. The connector seems to work but the load 
balancer will not use round robin over the servers.

Any ideas?

Thanx
    Björn Weis





-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic