After several test using mod_jk 2.0.43 on Linux with apache 2.0.43 we noticed that if we define workers.properties as follow the load balancing send to both tomcat server but not in the same ratio.

For example if we stress with 100 users, 80 are routed to the first tomcat server declared in workers.properties and 20 are routed to the second.

 

After a look at the source code i supposed that if lb_factor is similar for all load_balanced worker, load should be equal on all. But not.

 

# Workers.properties

ps=/

 

worker.list=infonetworker

 

# ------------------------

# First tomcat server

# ------------------------

worker.tomcat1.port=8112

worker.tomcat1.host=clos1030.casden.fr

worker.tomcat1.type=ajp13

worker.tomcat1.cachesize=10

worker.tomcat1.cache_timeout=600

worker.tomcat1.socket_keepalive=0

worker.tomcat1.socket_timeout=300

 

 

 

#

# Specifies the load balance factor when used with

# a load balancing worker.

# Note:

#  ----> lbfactor must be > 0

#  ----> Low lbfactor means less work done by the worker.

worker.tomcat1.lbfactor=1

 

# ------------------------

# Second tomcat server

# ------------------------

worker.tomcat2.port=8112

worker.tomcat2.host=clos1032.casden.fr

worker.tomcat2.type=ajp13

worker.tomcat2.cachesize=10

worker.tomcat2.cache_timeout=600

worker.tomcat2.socket_keepalive=0

worker.tomcat2.socket_timeout=300

 

#

# Specifies the load balance factor when used with

# a load balancing worker.

# Note:

#  ----> lbfactor must be > 0

#  ----> Low lbfactor means less work done by the worker.

worker.tomcat2.lbfactor=1

 

 

# ------------------------

# Load Balancer worker

# ------------------------

#

 

# The loadbalancer (type lb) worker performs weighted round-robin

# load balancing with sticky sessions.

# Note:

#  ----> If a worker dies, the load balancer will check its state

#        once in a while. Until then all work is redirected to peer

#        worker.

worker.infonetworker.type=lb

worker.infonetworker.balanced_workers=tomcat1, tomcat2

 

 

#

# END workers.properties

#

 

 

Eric LAGALISSE

 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to