#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Payson, UT, United States
    Posts
    28
    Rep Power
    0

    Tomcat - load balancing workers


    Today I was installing Apache 1.3.27 and Tomcat 4.1.18 and as I was configuring the mod_jk connector, I read the workers howto that contained instructions for setting up multiple workers and then using a load balancing worker to direct requests to different workers and share the load.

    I would think the ideal situation would be to have multiple machines and have a worker configured on machines that the load balancer worker is sending the requests to. But I am using a single machine, and wondered if it would be worthwhile to configure 2 workers and loadbalancer worker on one machine and then if one worker failed the other would still be operable (sort of like a back up). Am I understanding the way the Tomcat load balancing works?

    Here is my workers.properties file:
    Code:
    # Define workers (3 ajp13, 1 loadbalancer)
    worker.list=worker1,worker2,loadbalancer
    
    # Define worker1 properties
    worker.worker1.type=ajp13
    worker.worker1.host=localhost
    worker.worker1.port=8009
    worker.worker1.lbfactor=1
    worker.worker1.cachesize=10
    worker.worker1.cache_timeout=600
    worker.worker1.socket_keepalive=1
    worker.worker1.socket_timeout=300
    
    # Define worker2 properties
    worker.worker2.type=ajp13
    worker.worker2.host=localhost
    worker.worker2.port=8009
    worker.worker2.lbfactor=10
    worker.worker2.cachesize=10
    worker.worker2.cache_timeout=600
    worker.worker2.socket_keepalive=1
    worker.worker2.socket_timeout=300
    
    # Define loadbalancer properties
    worker.loadbalancer.type=lb 
    
    worker.loadbalancer.balanced_workers=worker1,worker2
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0
    I need to set it up too. What is the changes needed in httpd.conf? and Which mod_jk xxxx dll do you use?

    Thanks !
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    2
    Rep Power
    0
    Do you use sticky session in your loadbalancer? The loadbalancer routes the request to tomcat randamly, but my apps require sticky session. Any ideas?

    Thanks

IMN logo majestic logo threadwatch logo seochat tools logo