Cluster tag
From Resin 3.0
(Difference between revisions)
Line 1: | Line 1: | ||
[[Category:Configuration]] [[Category:Cluster]] | [[Category:Configuration]] [[Category:Cluster]] | ||
− | [[Clustering and Load Balancing|Cluster] configuration documentation is at http://www.caucho.com/resin-3.0/config/balance.xtp. | + | [[Clustering and Load Balancing|Cluster]] configuration documentation is at http://www.caucho.com/resin-3.0/config/balance.xtp. |
== <cluster> tag == | == <cluster> tag == |
Revision as of 19:25, 22 December 2005
Cluster configuration documentation is at http://www.caucho.com/resin-3.0/config/balance.xtp.
Contents |
<cluster> tag
tag | description | default |
---|---|---|
id | unique identifier of the cluster | "" |
cluster-ref | use the values from a cluster-definition tag | |
client-live-time | how long the load-balancer should keep an idle socket open | 30s |
client-dead-time | how long the load-balancer should treat a backend as dead | 30s |
client-read-timeout | timeout of load-balancer reads | 30s |
client-write-timeout | timeout of load-balancer writes | |
<srun> | configures an srun port |
<cluster-definition> tag
tag | description | default |
---|---|---|
id | unique identifier of the cluster definition | "" |
client-live-time | how long the load-balancer should keep an idle socket open | 30s |
client-dead-time | how long the load-balancer should treat a backend as dead | 30s |
client-read-timeout | timeout of load-balancer reads | 30s |
client-write-timeout | timeout of load-balancer writes | |
<srun> | configures an srun port |
example
Clustering and load balancing is configured in a <cluster> tag inside the <server> block of the resin.conf.
A cluster with two machines might look like:
resin.conf
<resin xmlns="http://caucho.com/ns/resin"> ... <server> <cluster> <client-live-time>30s</client-live-time> <srun id="a" host="192.168.0.10" port="6802"/> <srun id="b" host="192.168.0.11" port="6803"/> </cluster> ... </server> </resin>
Load Balancing Timeouts
Load balancing has two sets of time outs, one set from the client (front-end) perspective, and one set from the server (back-end) perspective.
The client timeouts are configured directly in the <cluster> tag. The server timeouts are configured in the individual <srun> tags.
client-read-timeout | How long the frontend should wait on a read before timing out | 60s |
client-write-timeout | How long the frontend should wait on a write before timing out | 60s |
client-live-time | How long the frontend should keep a socket alive before discarding it | 60s |
client-dead-time | How long the frontend should treat a backend as dead before retrying | 15s |
resin.conf
<cluster> <client-live-time>60s</client-live-time> <srun id="a" host="192.168.0.10" port="6802"/> </cluster>
The server timeouts specify how long the backend will wait for new data from a frontend before giving up. This timeout should be longer than the client-live-time.
read-timeout | How long the backend should wait on a read before timing out | 30s |
write-timeout | How long the backend should wait on a write before timing out | 30s |
resin.conf
<cluster> ... <srun id="c" host="196.168.0.14" port="6802" read-timeout="120s"/> ... </cluster>