You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by LAGALISSE Eric <Er...@casden.banquepopulaire.fr> on 2003/03/24 10:08:13 UTC

lb_factor defect.

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

 


Re: lb_factor defect.

Posted by Henri Gomez <hg...@apache.org>.
LAGALISSE Eric wrote:
> 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.
> 

Which release of mod_jk are you using ?

jk 1.2.2 is the latest release and there is some fixes in HEAD (which
will became shortly 1.2.3).

Could you retry with HEAD ?



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org