You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Burns <sb...@trcinc.com> on 2003/01/16 16:31:24 UTC

configuring tomcat/apache using loadbalancing for ajp

I am curious if this setup looks correct. I am confused about using the alias directive.  If you have multiple workers how can you specify more than one alias with the same fakename? Do I need to use them.  do I need to explicitly use them for the JkMount directives?   thanks
 
Scott
 
Alias /bizflow "/apps/tomcat/tomcat-worker1/webapps/bizflow"
Alias /bizapps "/apps/tomcat/tomcat-worker2/webapps/bizapps"
Alias /bizflow "/apps/tomcat/tomcat-worker1/webapps/bizflow"
Alias /bizapps "/apps/tomcat/tomcat-worker2/webapps/bizapps"
 
<Directory "/apps/tomcat/tomcat-worker1/webapps/bizflow">
 Allow from all
</Directory>
<Directory "/apps/tomcat/tomcat-worker2/webapps/bizflow">
 Allow from all
</Directory>
<Directory "/apps/tomcat/tomcat-worker1/webapps/bizapps">
        Allow from all
</Directory>

<Directory "/apps/tomcat/tomcat-worker2/webapps/bizapps">
        Allow from all
</Directory>
 
JkMount /bizflow/*.jsp loadbalancer
JkMount /bizapps/*.jsp loadbalancer
JkMount /bizapps/*/servlet/ loadbalancer
JkMount /bizflow/*/servlet/ loadbalancer
 
 

worker.list=worker1, worker2, loadbalancer
# ------------------------
# First tomcat server
# ------------------------
worker.worker1.port=8015
worker.worker1.host=localhost
worker.worker1.type=ajp13
# Specify the size of the open connection cache.
worker.worker1.cachesize=50
#
# 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.worker1.lbfactor=100

# ------------------------
# Second tomcat server
# ------------------------
worker.worker2.port=8016
worker.worker2.host=localhost
worker.worker2.type=ajp13
# Specify the size of the open connection cache.
worker.worker2.cachesize=50
#
# 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.worker2.lbfactor=100
 
# ------------------------
# 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.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1, worker2