source: nutchez-0.1/tomcat/webapps/docs/config/cluster.html @ 256

Last change on this file since 256 was 66, checked in by waue, 15 years ago

NutchEz - an easy way to nutch

File size: 13.8 KB
Line 
1<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Configuration Reference - The Cluster object</title><meta value="Filip Hanik" name="author"><meta value="fhanik@apache.org" name="email"></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt="
2    The Apache Tomcat Servlet/JSP Container
3  " align="right" src="../images/tomcat.gif"></a></td><td><font face="arial,helvetica,sanserif"><h1>Apache Tomcat 6.0</h1></font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="../images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Config Ref. Home</a></li></ul><p><strong>Top Level Elements</strong></p><ul><li><a href="server.html">Server</a></li><li><a href="service.html">Service</a></li></ul><p><strong>Executors</strong></p><ul><li><a href="executor.html">Executor</a></li></ul><p><strong>Connectors</strong></p><ul><li><a href="http.html">HTTP</a></li><li><a href="ajp.html">AJP</a></li></ul><p><strong>Containers</strong></p><ul><li><a href="context.html">Context</a></li><li><a href="engine.html">Engine</a></li><li><a href="host.html">Host</a></li><li><a href="cluster.html">Cluster</a></li></ul><p><strong>Nested Components</strong></p><ul><li><a href="globalresources.html">Global Resources</a></li><li><a href="loader.html">Loader</a></li><li><a href="manager.html">Manager</a></li><li><a href="realm.html">Realm</a></li><li><a href="resources.html">Resources</a></li><li><a href="valve.html">Valve</a></li></ul><p><strong>Cluster Elements</strong></p><ul><li><a href="cluster.html">Cluster</a></li><li><a href="cluster-manager.html">Manager</a></li><li><a href="cluster-channel.html">Channel</a></li><li><a href="cluster-membership.html">Channel/Membership</a></li><li><a href="cluster-sender.html">Channel/Sender</a></li><li><a href="cluster-receiver.html">Channel/Receiver</a></li><li><a href="cluster-interceptor.html">Channel/Interceptor</a></li><li><a href="cluster-valve.html">Valve</a></li><li><a href="cluster-deployer.html">Deployer</a></li><li><a href="cluster-listener.html">ClusterListener</a></li></ul><p><strong>Global Settings</strong></p><ul><li><a href="systemprops.html">System properties</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td valign="top" align="left"><h1>Apache Tomcat Configuration Reference</h1><h2>The Cluster object</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/cluster.html"><img alt="Printer Friendly Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
4                    </a></small></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Introduction"><strong>Introduction</strong></a></font></td></tr><tr><td><blockquote>
5  <p>
6  The tomcat cluster implementation provides session replication, context attribute replication and
7  cluster wide WAR file deployment.
8  While the <code>Cluster</code> configuration is fairly complex, the default configuration will work
9  for most people out of the box. </p><p>
10  The Tomcat Cluster implementation is very extensible, and hence we have exposed a myriad of options,
11  making the configuration seem like a lot, but don't lose faith, instead you have a tremendous control
12  over what is going on.</p>
13</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Engine vs Host placement"><strong>Engine vs Host placement</strong></a></font></td></tr><tr><td><blockquote>
14  <p>
15   You can place the <code>&lt;Cluster&gt;</code> element inside either the <code>&lt;Engine&gt;</code>
16   container or the <code>&lt;Host&gt;</code> container.<br>
17   Placing it in the engine, means that you will support clustering in all virtual hosts of Tomcat,
18   and share the messaging component. When you place the <code>&lt;Cluster&gt;</code> inside the <code>&lt;Engine&gt;</code>
19   element, the cluster will append the host name of each session manager to the managers name so that two contexts with
20   the same name but sitting inside two different hosts will be distinguishable.
21  </p>
22</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Context Attribute Replication"><strong>Context Attribute Replication</strong></a></font></td></tr><tr><td><blockquote>
23  <p>To configure context attribute replication, simply do this by swapping out the context implementation
24  used for your application context.
25    <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>&lt;Context className="org.apache.catalina.ha.context.ReplicatedContext"/&gt;</pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr></table></div>
26    This context extends the Tomcat <code><a href="context.html">StandardContext</a></code>
27    so all the options from the <a href="context.html">base implementation</a> are valid.
28  </p>
29</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Nested Components"><strong>Nested Components</strong></a></font></td></tr><tr><td><blockquote>
30  <p><b><a href="cluster-manager.html">Manager</a>:</b> <br>
31    The session manager element identifies what kind of session manager is used in this cluster implementation.
32    This manager configuration is identical to the one you would use in a regular <code><a href="context.html#Nested%20xComponents">&lt;Context&gt;</a></code> configuration.
33    <br>The default value is the <code>org.apache.catalina.ha.session.DeltaManager</code> that is closely coupled with
34    the <code>SimpleTcpCluster</code> implementation. Other managers like the <code>org.apache.catalina.ha.session.BackupManager</code>
35    are/could be loosely coupled and don't rely on the <code>SimpleTcpCluster</code> for its data replication.
36  </p>
37  <p><b><a href="cluster-channel.html">Channel</a>:</b> <br>
38    The Channel and its sub components are all part of the IO layer
39    for the cluster group, and is a module in it's own that we have nick named "Tribes"
40    <br>
41    Any configuring and tuning of the network layer, the messaging and the membership logic
42    will be done in the channel and its nested components.
43    You can always find out more about <a href="../tribes/introduction.html">Apache Tribes</a>
44  </p>
45  <p><b><a href="cluster-valve.html">Valve</a>:</b> <br>
46    The Tomcat Cluster implementation uses <code>Tomcat <a href="valve.html">Valves</a></code> to
47    track when requests enter and exit the servlet container. It uses these valves to be able to make
48    intelligent decisions on when to replicate data, which is always at the end of a request.
49  </p>
50  <p><b><a href="cluster-deployer.html">Deployer</a>:</b> <br>
51    The Deployer component is the Tomcat Farm Deployer. It allows you to deploy and undeploy applications
52    cluster wide.
53  </p>
54  <p><b><a href="cluster-listener.html">ClusterListener</a>:</b> <br>
55    ClusterListener's are used to track messages sent and received using the <code>SimpleTcpCluster</code>.
56    If you wish to track messages, you can add a listener here, or you can add a valve to the channel object.
57  </p>
58</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Deprecated configuration options"><strong>Deprecated configuration options</strong></a></font></td></tr><tr><td><blockquote>
59  <p>
60    <b>Deprecated settings:</b> In the previous version of Tomcat you were able to control session
61       manager settings using manager.&lt;property&gt;=value.
62       This has been discontinued, as the way it was written interfers with
63       the ability to support multiple different manager classes under one cluster implementation,
64       as the same properties might have the different effect on different managers.
65  </p>
66</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Attributes"><strong>Attributes</strong></a></font></td></tr><tr><td><blockquote>
67  <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="SimpleTcpCluster Attributes"><strong>SimpleTcpCluster Attributes</strong></a></font></td></tr><tr><td><blockquote>
68  <table cellpadding="5" border="1"><tr><th bgcolor="#023264" width="15%"><font color="#ffffff">Attribute</font></th><th bgcolor="#023264" width="85%"><font color="#ffffff">Description</font></th></tr><tr><td valign="center" align="left"><strong><code>className</code></strong></td><td valign="center" align="left">
69      <p>The main cluster class, currently only one is available,
70         <code>org.apache.catalina.ha.tcp.SimpleTcpCluster</code>
71      </p>
72    </td></tr><tr><td valign="center" align="left"><strong><code>channelSendOptions</code></strong></td><td valign="center" align="left">
73      <p>The Tribes channel send options, default is <code>8</code>.<br>
74         This option is used to set the flag that all messages sent through the
75         SimpleTcpCluster uses. The flag decides how the messages are sent, and is a simple logical OR.<br>
76         
77      <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
78        int options= Channel.SEND_OPTIONS_ASYNCHRONOUS |
79                     Channel.SEND_OPTIONS_SYNCHRONIZED_ACK |
80                     Channel.SEND_OPTIONS_USE_ACK;
81      </pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr></table></div>
82      Some of the values are:<br>
83      <code>Channel.SEND_OPTIONS_SYNCHRONIZED_ACK = 0x0004</code><br>
84      <code>Channel.SEND_OPTIONS_ASYNCHRONOUS = 0x0008</code><br>
85      <code>Channel.SEND_OPTIONS_USE_ACK = 0x0002</code><br>
86      So to use ACK and ASYNC messaging, the flag would be <code>10 (8+2) or 0x000B</code><br>
87      </p>
88    </td></tr><tr><td valign="center" align="left"><code>heartbeatBackgroundEnabled</code></td><td valign="center" align="left">
89      <p>Enable this flag don't forget to disable the channel heartbeat thread.
90      </p>
91    </td></tr><tr><td valign="center" align="left"><code>doClusterLog</code></td><td valign="center" align="left">
92      <p><b>Deprecated since 6.0.0</b></p>
93      <p>Possible values are <code>true</code> or <code>false</code><br>
94         Value is inherited from Tomcat 5.5 and has no official meaning.
95         to configure logging, use the standard tomcat logging configuration.
96      </p>
97    </td></tr><tr><td valign="center" align="left"><code>clusterLogName</code></td><td valign="center" align="left">
98      <p><b>Deprecated since 6.0.0</b></p>
99      <p>
100        Value is inherited from Tomcat 5.5 and has no official meaning.
101         to configure logging, use the standard tomcat logging configuration.
102      </p>
103    </td></tr></table>
104  </blockquote></td></tr></table>
105</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
106        Copyright &copy; 1999-2008, Apache Software Foundation
107        </em></font></div></td></tr></table></body></html>
Note: See TracBrowser for help on using the repository browser.