📄 cluster-tags.xtp
字号:
... <host host-name="www.foo.com"> ... </cluster></resin></example></defun><defun title="<rewrite-dispatch>" version="Resin 3.1"><parents>cluster</parents><p><rewrite-dispatch> defines a set of rewriting rules fordispatching and forwarding URLs. Applications can use these rulesto redirect old URLs to their new replacements.</p><p>See <a href="rewrite-tags.xtp">rewrite-dispatch</a> for moredetails.</p><example title="rewrite-dispatch"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="web-tier"> <rewrite-dispatch> <redirect regexp="^http://www.foo.com" target="http://bar.com/foo"/> </rewrite-dispatch> </cluster></resin></example></defun><defun title="<root-directory>" version="Resin 3.1"><parents>cluster</parents><default>The root-directory of the <resin> tag.</default><p><root-directory> configures the root directory for fileswithin the cluster. All paths in the <cluster> will be relativeto the root directory.</p><def title="<root-directory> schema">element root-directory { r_path-Type}</def><example title="Example: cluster root-directory"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="app-tier"> <root-directory>/var/www/app-tier</root-directory> <server id="a" ...> <host host-name="www.foo.com"> </cluster></resin></example></defun><defun title="<server>" version="Resin 3.1"><parents>cluster</parents><p>The <server> tag configures a JVM instance inthe cluster. Each <server> is uniquely identified byits <var>id</var> attribute. The <var>id</var> will matchthe -server-id command line argument.</p><p>See the full <a href="server-tags.xtp">server configuration</a>for more details of the <server> tag and its children.</p><p>The current server is managed with a<a href="javadoc|com.caucho.management.server.ServerMXBean">ServerMXBean</a>.The <g>ObjectName</g> is <var>resin:type=Server</var>.</p><p>Peer servers are managed with <a href="javadoc|com.caucho.management.server.ServerConnectorMXBean">ServerConnectorMXBean</a>. The ObjectName is <var>resin:type=ServerConnector,name=server-id</var>.</p><deftable title="<server> Attributes"><tr> <th>Attribute</th> <th>Description</th> <th>Default</th></tr><tr> <td>address</td> <td>IP address of the cluster port</td> <td>127.0.0.1</td></tr><tr> <td>bind-ports-after-start</td> <td>If true, listen to the ports only after all initialization hascompleted, allowing load-balance failover.</td> <td>true</td></tr><tr> <td>cluster-port</td> <td>Configures the cluster port in detail, allowing for customizationof timeouts, etc.</td> <td></td></tr><tr> <td>group-name</td> <td>Used by the watchdog to switch setgid before starting the ResinJVM instance for security.</td> <td></td></tr><tr> <td>http</td> <td>Adds a HTTP port (see <a href="port-tags.xtp">port tags</a>)</td> <td></td></tr><tr> <td>id</td> <td>Unique server identifier</td> <td>required</td></tr><tr> <td>java-exe</td> <td>The specific Java executable for the watchdogto launch the JVM</td> <td>java</td></tr><tr> <td>jvm-arg</td> <td>Adds a JVM argument when the watchdog launches Resin.</td> <td></td></tr><tr> <td>jvm-classpath</td> <td>Adds a JVM classpath when the watchdog launches Resin.</td> <td></td></tr><tr> <td>keepalive-connection-time-max</td> <td>The total time a connection can be used for requests and keepalives</td> <td>10min</td></tr><tr> <td>keepalive-max</td> <td>The maximum keepalives enabled at one time.</td> <td>128</td></tr><tr> <td>keepalive-select-enable</td> <td>Enables epoll/select for keepalive requests to reduce threads (unix only)</td> <td>true</td></tr><tr> <td>keepalive-timeout</td> <td>Timeout for a keepalive to wait for a new request</td> <td>15s</td></tr><tr> <td>load-balance-connect-timeout</td> <td>How long the load-balancer should wait for a connection to this server</td> <td>5s</td></tr><tr> <td>load-balance-idle-time</td> <td>How long the load balancer can keep an idle socket open to this server (see keepalive-timeout)</td> <td>keepalive-time - 2s</td></tr><tr> <td>load-balance-recover-time</td> <td>How long the load balancer should treat this server as dead after a failure before retrying</td> <td>15s</td></tr><tr> <td>load-balance-socket-timeout</td> <td>timeout for the load balancer reading/writing to this server</td> <td>65s</td></tr><tr> <td>load-balance-warmup-time</td> <td>Warmup time for the load-balancer to throttle requests before sending the full load</td> <td>60s</td></tr><tr> <td>load-balance-weight</td> <td>relative weight used by the load balancer to send traffic to this server</td> <td>100</td></tr><tr> <td>memory-free-min</td> <td>minimum memory allowed for the JVM before Resin forces a restart</td> <td>1M</td></tr><tr> <td>ping</td> <td>Configures a periodic ping of the server to force restarts when non-responsive</td> <td></td></tr><tr> <td>port</td> <td>Configures the cluster port (shortcut for <cluster-port>)</td> <td>6800</td></tr><tr> <td>protocol</td> <td>Adds a custom socket protocol, e.g. for IIOP or SNMP.</td> <td></td></tr><tr> <td>shutdown-wait-max</td> <td>The maximum of time to wait for a graceful Resin shutdown before forcing a close</td> <td>60s</td></tr><tr> <td>socket-timeout</td> <td>The read/write timeout for the socket</td> <td>65s</td></tr><tr> <td>thread-max</td> <td>The maximum number of threads managed by Resin (JVM threads will be larger because of non-Resin threads)</td> <td>4096</td></tr><tr> <td>thread-executor-thread-max</td> <td>Limits the threads allocated to application ScheduledExecutors from Resin</td> <td></td></tr><tr> <td>thread-idle-max</td> <td>Maximum number of idle threads in the thread pool</td> <td>10</td></tr><tr> <td>thread-idle-min</td> <td>Minimum number of idle threads in the thread pool</td> <td>5</td></tr><tr> <td>user-name</td> <td>The setuid user-name for the <a href="resin-watchdog.xtp">watchdog</a>when launching Resin for Unix security.</td> <td></td></tr><tr> <td>watchdog-jvm-arg</td> <td>Additional JVM arguments when launching the watchdog manager</td> <td></td></tr><tr> <td>watchdog-port</td> <td>The port for the watchdog-manager to listen for start/stop/statusrequests</td> <td>6700</td></tr></deftable><def title="<server> schema">element server { attribute id { string } & address? & bind-ports-after-start? & cluster-port* & group-name? & http* & java-exe? & jvm-arg? & jvm-classpath? & keepalive-connection-time-max? & keepalive-max? & keepalive-select-enable? & keepalive-timeout? & load-balance-connect-timeout? & load-balance-idle-time? & load-balance-recover-time? & load-balance-socket-timeout? & load-balance-warmup-time? & load-balance-weight? & memory-free-min? & ping? & port? & protocol? & shutdown-wait-max? & socket-timeout? & thread-max? & thread-executor-task-max? & thread-idle-max? & thread-idle-min? & user-name? & watchdog-jvm-arg* & watchdog-port?}</def><example title="Example: server"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="web-tier"> <server id="a" address="192.168.0.10" port="6800"> <http port="8080"/> </server> <server id="b" address="192.168.0.11" port="6800"> <http port="8080"/> </server> <server id="c" address="192.168.0.12" port="6800"> <http port="8080"/> </server> <host id=""> ... </cluster></resin></example></defun><defun title="<server-default>" version="Resin 3.1"><parents>cluster</parents><p>Defines default values for all <server> instances. See<a href="server-tags.xtp"><server> configuration</a> for more details.</p><example title="Example: server"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="web-tier"> <server-default> <server-port>6800</server-port> <http port="8080"/> </server-default> <server id="a" address="192.168.0.10"/> <server id="b" address="192.168.0.11"/> <server id="c" address="192.168.0.12"/> <host id=""> ... </cluster></resin></example></defun><defun title="<server-header>" version="Resin 3.1"><parents>cluster</parents><default>Resin/3.1.x</default><p>Configures the HTTP Server: header which Resin sends back to anyHTTP client.</p><def title="<server-header> schema">element server-header { string}</def><example title="server-header"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="web-tier"> <server-header>MyServer/1.0</server-header> </cluster></resin></example></defun><defun title="<session-cookie>" version="Resin 3.1"><parents>cluster</parents><default>JSESSIONID</default><p>Configures the cookie used for servlet sessions.</p><def title="<session-cookie> schema">element session-cookie { string}</def></defun><defun title="<session-sticky-disable>" version="Resin 3.1"><parents>cluster</parents><default>false</default><p>Disables sticky sessions from the load balancer.</p><def title="<session-sticky-disable> schema">element session-sticky-disable { r_boolean-Type}</def></defun><defun title="<session-url-prefix>" version="Resin 3.1"><parents>cluster</parents><default>;jsessionid=</default><p>Configures the URL prefix used for session rewriting.</p><note>Session rewriting is discouraged as a potential security issue.</note><def title="<session-cookie> schema">element session-cookie { string}</def></defun><defun title="<ssl-session-cookie>" version="Resin 3.1"><parents>cluster</parents><default>value of session-cookie</default><p>Defines an alternative session cookie to be used for a SSLconnection. Having two separate cookies increases security.</p><def title="<session-cookie> schema">element ssl-session-cookie { string}</def><example title="Example: ssl-session-cookie"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="web-tier"> <ssl-session-cookie>SSLJSESSIONID</ssl-session-cookie> ... </cluster></resin></example></defun><defun title="<url-character-encoding>" version="Resin 3.1"><parents>cluster</parents><default>UTF-8</default><p>Defines the character encoding for decoding URLs.</p><p>The HTTP specification does not define the character-encoding forURLs, so the server must make assumptions about the encoding.</p><def title="<url-character-encoding> schema">element url-character-encoding { string}</def></defun><defun title="<web-app-default>" version="Resin 3.1"><parents>cluster</parents><p><web-app-default> defines default values for any <g>web-app</g> inthe cluster.</p><example title="Example: web-app-default"><resin xmlns="http://caucho.com/ns/resin"> <cluster id="app-tier"> <web-app-default> <servlet servlet-name="resin-php" servlet-class="com.caucho.quercus.servlet.QuercusServlet"/> <servlet-mapping url-pattern="*.php" servlet-name="resin-php"/> </web-app-default> <host id=""> ... </cluster></resin></example></defun></body></document>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -