Hi,

here is the docs patch for the previouse patch of lb-worker. The base file is 
the current version from cvs.

But someone should look at it with more experience in writing docs in English :)

Have a nice weekend!

Bernd
-- 
Dipl.-Inform. Bernd Koecke
UNIX-Entwicklung
Schlund+Partner AG
Fon: +49-721-91374-0
E-Mail: [EMAIL PROTECTED]
--- Tomcat-Workers-HowTo.html.orig      Fri Apr  5 15:31:37 2002
+++ Tomcat-Workers-HowTo.html   Fri Apr  5 17:09:25 2002
@@ -371,6 +371,8 @@
  <li>Identifying
      failed Tomcat workers, suspending requests to them and instead
      fall-backing on other workers managed by the lb worker.</li>
+ <li>Additional
+     support for a &quot;local&quot; worker from the set of balanced workers.</li>
 </ul>
 
 <p>The overall result is that workers managed by the same lb
@@ -378,6 +380,22 @@
 also fall-backed so a single Tomcat process death will not &quot;kill&quot; the
 entire site.</p>
 
+<p>Additional you could define a so called &quot;local&quot; worker. If a request
+comes in without a session id or without the jvm-route at the end of the session
+id it will be routed to the local worker.</p>
+
+<p>You could define what will happen if this local worker is unreachable. You
+could set the &quot;fault_action&quot; directive to &quot;balance&quot; or
+&quot;reject&quot;. If it is set to &quot;balance&quot; the list of balanced
+workers will be searched to find another worker for this request. But without
+session replication, you would loose your session data, because you will send
+the request to a Tomcat process which doesn't know anything about your session.
+If set to &quot;reject&quot; the request will get an error. If you use this
+value you need an additonal load balancer in front of your cluster, because all
+requests without a session, which come to the lb-worker would go to the local
+worker, get possibly a session there and would go there for every request
+because of the third item on the above list.</p>
+
 <p>The following table specifies properties that the lb worker
 can accept:</p>
 
@@ -406,7 +424,67 @@
   <p>worker.loadbalancer.balanced_workers= local13, local12</p>
   </td>
  </tr>
+ <tr>
+  <td>
+   <p>local_worker</p>
+  </td>
+  <td>
+   <p>One of the workers from the balanced_workers list.</p>
+  </td>
+  <td>
+   <p>worker.loadbalancer.local_worker=local13</p>
+  </td>
+ </tr>
+ <tr>
+  <td>
+   <p>fault_action</p>
+  </td>
+  <td>
+    <ul>
+     <li>Value &quot;balance&quot; activates the normal load balancing if the
+     local worker is unreachable.</li>
+     <li>Value &quot;reject&quot; answers with an error if the local worker is
+     unreachable.</li>
+    </ul>
+    <p>Default is &quot;balance&quot;</p>
+  </td>
+  <td>
+    <p>worker.loadbalancer.fault_action=reject</p>
+  </td>
+ </tr>
 </table>
+
+<p>Example:</p>
+
+<p>The following is an example of the workers.properties file. Without the last
+two lines (local_worker, fault_action) all request will be load balanced.
+</p>
+
+<p>Note that you must use the name of the worker from the balanced_workers list in the
+corresponding Engine-Tag in your Tomact server.xml in the jvmRoute-Attribute.
+This value must be appended to all newly created session ids  by Tomcat, because
+the lb-worker needs this id appendix for routing the request to the right Tomcat
+server.
+</p>
+
+<pre>
+worker.list=router
+
+worker.TC1.port=8007
+worker.TC1.host=sample1.some.domain
+worker.TC1.type=ajp13
+worker.TC1.lbfactor=1
+
+worker.TC2.port=8007
+worker.TC2.host=sample2.some.domain
+worker.TC2.type=ajp13
+worker.TC2.lbfactor=1
+
+worker.router.type=lb
+worker.router.balanced_workers=TC1,TC2
+worker.router.local_worker=TC1
+worker.router.fault_action=reject
+</pre>
 
 <h3>jni Worker properties</h3>
 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to