A Tomcat worker is a Tomcat instance that is waiting to execute servlets or any other content
on behalf of some web server. For example, we can have a web server such as
@@ -49,6 +50,7 @@
+
Each workers.properties directive consists of three words separated by dot. The first word is always
worker. The second word is the worker name that can be any name. The worker name reflects the
name of the jvmRoute defined in Tomcat's server.xml configuration file.
@@ -60,6 +62,7 @@
+
The generic workers.properties directive is in the form:
worker.<worker name>.<directive>=<value>
Defining workers to the Tomcat web server plugin can be done using a properties file
@@ -75,6 +78,7 @@
+
Mandatory directives are the one that each worker must contain. Without them the worker will
be unavailable or will misbehave.
1.4 +22 -10 jakarta-tomcat-connectors/jk/xdocs/howto/workers.xml
Index: workers.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat-connectors/jk/xdocs/howto/workers.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- workers.xml 24 Apr 2005 10:30:09 -0000 1.3
+++ workers.xml 25 Apr 2005 06:53:25 -0000 1.4
@@ -146,6 +146,10 @@
Each worker has a set of properties that you can set as specified in the following subsections:
+
+The ajp12 has been deprecated with Tomcat 3.3.x and you should use instead
+ajp13 which is the only ajp protocol known by Tomcat 4.x and 5.
+
The ajp12 typed workers forward requests to out-of-process Tomcat workers
using the ajpv12 protocol over TCP/IP sockets.
@@ -256,18 +260,18 @@
The overall result is that workers managed by the same lb worker are load-balanced (based on their lbfactor and current user session) and also fall-backed so a single Tomcat process death will not "kill" the entire site.
The following table specifies properties that the lb worker can accept:
-
balanced_workers is a comma separated list of workers that the load balancer need to manage.
+
balance_workers is a comma separated list of workers that the load balancer need to manage.
These workers should not appear in the worker.list property.
sticky_session specifies whether requests with SESSION ID's should be routed back to the same
-Tomcat worker. If sticky_session is an int and is not 0 it is set to JK_TRUE and sessions are sticky, otherwise
-sticky_session is set to false. Set sticky_session to JK_FALSE when Tomcat is using a Session Manager which
-can persist session data across multiple instances of Tomcat. By default sticky_session is set to JK_TRUE.
+Tomcat worker. If sticky_session is an flag and if it is set to True and sessions are sticky, otherwise
+sticky_session is set to false. Set sticky_session to False when Tomcat is using a Session Manager which
+can persist session data across multiple instances of Tomcat. By default sticky_session is set to True.
The worker balance1 while use "real" workers worker1 and worker2
- worker.balance1.balanced_workers=worker1, worker2
+ worker.balance1.balance_workers=worker1, worker2
@@ -275,7 +279,7 @@
With JK 1.2.x, new load-balancing and fault-tolerant support has been added via
-2 new properties, local_worker_only and local_worker.
+2 new properties, redirect and disabled.
@@ -290,24 +294,32 @@
# The advanced router LB worker
worker.list=router
+
# Define a worker using ajp13
worker.worker1.port=8009
worker.worker1.host=node1.domain.org
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
+ # Define prefered failover node for worker1
+ worker.worker1.redirect=worker2
+
# Define another worker using ajp13
worker.worker2.port=8009
worker.worker2.host=node2.domain.org
worker.worker2.type=ajp13
worker.worker2.lbfactor=1
+ # Disable worker2 for all requests except failover
+ worker.worker2.disabled=True
+
# Define the LB worker
worker.router.type=lb
worker.router.balance_workers=worker1,worker2
-The local_worker flag on worker1 and worker2 tells the lb_worker which connections are going
-to the local worker.
+The redirect flag on worker1 tells the lb_worker to redirect the requests
+to worker2 only if worker1 is in error state. In other cases worker2 will not receive
+any requests, thus acting like a hot standby.
@@ -429,7 +441,7 @@
worker.worker3.stderr=$(workers.apache_log)$(ps)inprocess.stderr
worker.worker3.sysprops=tomcat.home=$(workers.tomcat_home)
# Set properties for worker4 (lb) which use worker1 and worker2
- worker.worker4.balanced_workers=worker1,worker2
+ worker.worker4.balance_workers=worker1,worker2
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org