[jboss-user] [Clustering/JBoss] - mod_jk 1.2 not distrubuting HTTP requests evenly

mjgreene550 do-not-reply at jboss.com
Sun Jun 3 13:13:05 EDT 2007


I've successfully configured jboss 4.0.5 for clustering and I have to say it was pretty easy with all the documentation provided by JBoss. Fail over and farming work as advertised. 

I'm currently trying to configure HTTP Session Replication.

My only concern is the mod_jk connector doesn't seem to be distributing the http requests evenly over the two nodes. The documentation that I've read suggests that mod_jk should alternate the requests over all of the nodes. In my case, it will alternate requests over all the nodes but not evenly. What ends up happening is Node 1 will handle say 9 requests, Node 2 will get 1 request, and then Node 1 gets a bunch more.

I feel like I'm missing something simple here, can anyone point me in the right direction? Much obliged.

My workers.properties file:
# Define list of workers that will be used
  | # for mapping requests
  | worker.list=loadbalancer,status
  | 
  | # Define Node1
  | # modify the host as your host IP or DNS name.
  | worker.node1.port=8009
  | worker.node1.host=192.168.1.31
  | worker.node1.type=ajp13
  | worker.node1.lbfactor=1
  | worker.node1.cachesize=10
  | 
  | # Define Node2
  | # modify the host as your host IP or DNS name.
  | worker.node2.port=8009
  | worker.node2.host=192.168.1.32
  | worker.node2.type=ajp13
  | worker.node2.lbfactor=1
  | worker.node2.cachesize=10
  | 
  | # Load-balancing behaviour
  | worker.loadbalancer.type=lb
  | worker.loadbalancer.balance_workers=node1,node2
  | worker.loadbalancer.sticky_session=0
  | #worker.list=loadbalancer
  | 
  | # Status worker for managing load balancer
  | worker.status.type=status

My mod-jk.conf file:
# Load mod_jk module
  | # Specify the filename of the mod_jk lib
  | LoadModule jk_module modules/mod_jk.so
  |  
  | # Where to find workers.properties
  | JkWorkersFile conf/workers.properties
  | 
  | # Where to put jk logs
  | JkLogFile logs/mod_jk.log
  |  
  | # Set the jk log level [debug/error/info]
  | JkLogLevel info 
  |  
  | # Select the log format
  | JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"
  |  
  | # JkOptions indicates to send SSK KEY SIZE
  | JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  |  
  | # JkRequestLogFormat
  | JkRequestLogFormat "%w %V %T"
  |                
  | # Mount your applications
  | JkMount /* loadbalancer
  |  
  | # You can use external file for mount points.
  | # It will be checked for updates each 60 seconds.
  | # The format of the file is: /url=worker
  | # /examples/*=loadbalancer
  | #JkMountFile conf/uriworkermap.properties               
  | 
  | # Add shared memory.
  | # This directive is present with 1.2.10 and
  | # later versions of mod_jk, and is needed for
  | # for load balancing to work properly
  | JkShmFile logs/jk.shm 
  |               
  | # Add jkstatus for managing runtime data
  | <Location /jkstatus/>
  |     JkMount status
  |     Order deny,allow
  |     Deny from all
  |     Allow from 127.0.0.1
  | </Location>    

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050751#4050751

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050751



More information about the jboss-user mailing list