0 Replies Latest reply on Jul 9, 2004 1:23 PM by jardia

    mod_jk + load balancing properties

      Hello.
      This topic is specifically about the following two settings found in the mod_jk workers.properties files:
      - local_worker
      - local_worker_only

      The official docu is at:
      http://jakarta.apache.org/tomcat/connectors-doc/jk2/jk/workershowto.html

      I found the explanation a little unclear and found a more succinct version here:
      http://sourceforge.net/mailarchive/message.php?msg_id=6782552

      local_worker=1 indicates that it"s running on the same box as apache.
      local_worker=0 indicates it"s running elsewhere.

      local_worker_only=1 says only send new requests (e.g. no jsessionid
      cookie/url) to workers with local_worker=1.
      local_worker_only=0 says new requests to any server.

      How it helps is that when you need to do maintenance on ww2, set
      local_worker_only=1 on ww1 and do a graceful restart on apache. New
      requests to ww1 will all go to the ww1 Tomcat instance. If a requests
      comes to apache on ww1 with a ww2 jsessionid, it will still route the
      request to the correct Tomcat instance. Eventually the sessions on ww2
      all die off and you can cleanly bring down the instance without killing
      off your users. You obviously need some other mechanism to stop HTTP
      requests from being directed to apache on ww2.

      I'm not sure what nodes/servers are involved here.

      Questions:
      1) Are ww1 and ww2 only tomcat instances or apache+tomcat instances?
      2) Is it assumed that there is a third apache instance infront of them or a loadbalancer?
      3) Is the quoted explanation even still correct?
      4) Would a quick explanation of the servers/nodes (apache/tomcat) involved and an example along the lines of the quoted one be possible?

      Thanks for your time