⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 server-tags.xtp

📁 RESIN 3.2 最新源码
💻 XTP
📖 第 1 页 / 共 3 页
字号:
<parents>server</parents><p>&lt;keepalive-select-thread-timeout> is a short timeout allowingthe select manager to wait for a keepalive before detaching thethread.  This value would not normally be changed.d wou</p><default>1s</default></defun><defun title="&lt;keepalive-timeout>" version="Resin 3.1"><parents>server</parents><p>&lt;keepalive-timeout> configures how long a keepaliveconnection should wait for a new request before closing.  </p><p>Keepalives are used both for HTTP connections and for load-balancing andclustering connections.  HTTP connections generally have a single HTML page,followed by a number of image requests.  By using keepalives, all the requestscan use a single socket.  The &lt;keepalive-timeout> should be longenough to catch all the HTTP burst requests, but can close after theburst is complete.  A value of 5s or 10s is generally sufficient.</p><p>The load-balancing and clustering keepalives have a differenttimeout behavior.  Since load-balancing sockets are reused for multipleclients, they can have longer timeouts.</p><default>10s</default><example title="keepalive-thread-max in resin.xml">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;  &lt;cluster id="web-tier"&gt;    &lt;server-default&gt;      &lt;http port="80"/>      &lt;thread-max>512&lt;/thread-max>      &lt;keepalive-max>100&lt;/keepalive-max>      &lt;keepalive-timeout>10s&lt;/keepalive-timeout>    &lt;/server-default&gt;    &lt;server id="web-a" address="192.168.0.10"/>        ...  &lt;/cluster>&lt;/resin></example></defun><defun title="&lt;load-balance-connect-timeout>" version="Resin 3.1"><parents>server</parents><p>&lt;load-balance-connect-timeout> configures the maximum timea client connection to a cluster-port shouldtake.  The <a href="resin-clustering.xtp">load balance</a> and<a href="config-sessions.xtp">persistent sessions</a> use load-balance-connect-timeoutto connect to backend or peer servers in the cluster.</p><p>Lower values detect failed servers more quickly, but a too-low valuecan timeout too quickly for a live server with some network congestion.</p><default>5s</default><example title="load-balance-connect-timeout">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;    &lt;cluster id="app-tier"&gt;        &lt;server-default>          &lt;load-balance-connect-timeout>2s&lt;/load-balance-connect-timeout>        &lt;/server-default>        &lt;server id="a" address="192.168.0.10" port="6800"/&gt;        &lt;server id="b" address="192.168.0.11" port="6800"/&gt;        &lt;host id=""&gt;          ...    &lt;/cluster&gt;&lt;/resin&gt;</example></defun><defun title="&lt;load-balance-recover-time>" version="Resin 3.1"><parents>server</parents><p>&lt;load-balance-recover-time> is the maximum timethe <a href="resin-clustering.xtp">load balancer</a>will consider the server dead after a failure before retryingthe connection.</p><p>Resin uses the load-balance-recover-time to avoid wasting time trying toconnect to an unavailable app-tier server.</p><p>Lower values let the load balancer use a restarted <g>app-tier</g> serverfaster, but lower values also increase the overhead of trying tocontact unavailable servers.</p><default>15s</default><example title="load-balance-recover-time">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;    &lt;cluster id="app-tier"&gt;        &lt;server-default>          &lt;load-balance-recover-time>10s&lt;/load-balance-recover-time>        &lt;/server-default>        &lt;server id="a" address="192.168.0.10" port="6800"/&gt;        &lt;server id="b" address="192.168.0.11" port="6800"/&gt;        &lt;host id=""&gt;          ...    &lt;/cluster&gt;&lt;/resin&gt;</example></defun><defun title="&lt;load-balance-idle-time>" version="Resin 3.1"><parents>server</parents><p>&lt;load-balance-idle-time> is the maximum timethe <a href="resin-clustering.xtp">load balancer</a>and <a href="config-sessions.xtp">distributed sessions</a> will leave anidle socket before closing it.</p><p>The default value is normally sufficient, since it tracks thekeepalive of the cluster port.</p><p>load-balance-idle-time must be less than the <var>keepalive</var> value ofthe target <a href="port-tags.xtp#cluster-port">cluster-port</a>.</p><p>The load balancer and distributed sessions reuse sockets to thecluster peer and <g>app-tier</g> servers to improve TCP performance.The load-balance-idle-time limits the amount of time those sockets canremain idle.</p><p>Higher values may improve the socket pooling, but may also increasethe chance of connecting to a closed server.</p><default>keepalive-timeout - 1s</default></defun><defun title="&lt;load-balance-warmup-time>" version="Resin 3.1"><parents>server</parents><p>The time the <a href="resin-clustering.xtp">load balancer</a>uses to throttle connections to an <g>app-tier</g> server that's juststarting up.</p><p>Java web-applications often start slowly while they initialize caches.So a newly-started application will often be slower and consume moreresources than a long-running application.  The warmup-time increasesResin's reliability by limiting the number of requests to a newapp-tier server until the server has warmed up.</p><p>Larger values give the application a longer time to warm up.</p><default>60s</default><example title="load-balance-warmup-time">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;    &lt;cluster id="app-tier"&gt;        &lt;server-default>          &lt;load-balance-warmup-time>60s&lt;/load-balance-warmup-time>        &lt;/server-default>        &lt;server id="a" address="192.168.0.10" port="6800"/&gt;        &lt;server id="b" address="192.168.0.11" port="6800"/&gt;        &lt;host id=""&gt;          ...    &lt;/cluster&gt;&lt;/resin&gt;</example></defun><defun title="&lt;load-balance-weight>" version="Resin 3.1"><parents>server</parents><p>load-balance-weight assigns a load-balance weight to a backend server.Servers with higher values get more requests.  Servers with lowervalues get fewer requests.</p><p>In some cases, some <g>app-tier</g> servers may be more powerful thanothers.  load-balance-weight lets the load-balancer assign more connectionsto the more powerful machines.</p><p>Test and profiling servers can also use load-balance-weight to receive asmall number of connections for profiling purposes.</p><p>Larger values tell the load-balancer to assign more requests tothe app-tier server.</p><default>100</default><example title="load-balance-weight">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;    &lt;cluster id="app-tier"&gt;        &lt;server id="a" address="192.168.0.10" port="6800"/&gt;        &lt;server id="b" address="192.168.0.10" port="6800"/&gt;        &lt;server id="test" address="192.168.0.100" port="6800"&gt;            &lt;load-balance-weight>1&lt;/load-balance-weight>        &lt;/server>        &lt;host id=""&gt;          ...    &lt;/cluster&gt;&lt;/resin&gt;</example></defun><defun title="&lt;memory-free-min>" version="Resin 3.1"><parents>server</parents><p>&lt;memory-free-min> improves server reliability by detectinglow-memory situations caused by memory leaks and forcing aclean server restart.  Since Resin's <g>watchdog</g> servicereliably restarts the server, a website can improve stability by forcinga restart before memory becomes a major problem.  The memory-free-minrestart will also log a warning, notifying the developers thata potential memory leak needs to be resolved.</p><p>When free heap memory gets very low, the garbage collector canrun continually trying to free up extra memory.  This continualgarbage collection can send the CPU time to 100%, cause the site tobecome completely unresponsive, and yet take a long time before finallyfailing to an out of memory error (forcing an unclean restart).  To avoid thissituation, Resin will detect the low-memory condition and gracefullyrestart the server when free memory becomes too low.</p><p>The ultimate solution to any memory leak issues is to get amemory profiler, find the leaking memory and fix it.  &lt;memory-free-min>is just a temporary bandage to keep the site running reliably untilthe memory leak can be found and fixed.</p><default>1m</default><example title="memory-free-min resin.xml">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;  &lt;cluster id="web-tier"&gt;    &lt;server-default&gt;      &lt;thread-max>512&lt;/thread-max>      &lt;memory-free-min>1m&lt;/memory-free-min>    &lt;/server-default&gt;    &lt;server id="web-a" address="192.168.0.10"/>        ...  &lt;/cluster>&lt;/resin></example></defun><defun title="&lt;port>" version="Resin 3.1"><parents>server</parents><p>The server &lt;port> defines the TCP port for Resincluster communication and load balancing.  Most server instanceswill use a common port like 6800, while machines with multipleservers may use multiple ports like 6800 and 6801.</p><default>6800</default><example title="multipl servers on a machine ">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;  &lt;cluster id="app-tier"&gt;    &lt;server id="app-a" address="192.168.1.11" port="6800"/>    &lt;server id="app-b" address="192.168.1.11" port="6801"/>    &lt;server id="app-b" address="192.168.2.12" port="6800"/>    &lt;server id="app-c" address="192.168.2.12" port="6801"/>    ...  &lt;/cluster>&lt;/resin></example></defun><defun title="&lt;protocol>" version="Resin 3.1"><parents>server</parents><p>&lt;protocol> configures custom socket protocols using Resin's threadand connection management.</p><p>The custom protocol will extend from com.caucho.server.port.Protocol.</p><example>&lt;resin xmlns="http://caucho.com/ns/resin"&gt;&lt;cluster id="web-tier"&gt;  &lt;server id="a"&gt;    &lt;protocol address="localhost" port="8888"&gt;      &lt;type>example.Magic8BallProtocol&lt;/type>    &lt;/port&gt;  &lt;/server&gt;&lt;/cluster&gt;&lt;/resin&gt;</example></defun><defun title="&lt;server>" version="Resin 3.1"><parents>cluster</parents><p>&lt;server> configures a JVM instance in the cluster.Each &lt;server&gt; is uniquely identified byits <var>id</var> attribute.  The <var>id</var> will matchthe -server-id command line argument.</p><p>The server listens to an internal network address,e.g. 192.168.0.10:6800 for clustering, load balancing,and administration.</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-childtags><tr><td>id</td>    <td>unique server identifier</td>    <td>required</td></tr><tr><td>address</td>    <td>IP address of the cluster port</td>    <td>127.0.0.1</td></tr><tr><td>port</td>    <td>The cluster port</td>    <td>6800</td></tr></deftable-childtags><example title="server">&lt;resin xmlns="http://caucho.com/ns/resin"&gt;    &lt;cluster id="web-tier"&gt;        &lt;server id="a" address="192.168.0.10" port="6800"&gt;          &lt;http port="8080"/&gt;        &lt;/server&gt;        &lt;server id="b" address="192.168.0.11" server-port="6800"&gt;          &lt;http port="8080"/&gt;        &lt;/server&gt;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -