balancer
Can be used in
serviceProxy, soapProxy, transport, beans
Syntax
<balancer name="string" sessionTimeout="int"> <xmlSessionIdExtractor >? <jSessionIdExtractor >? <nodes>? <byThreadStrategy >? <roundRobinStrategy >? </balancer>
Listing 1: balancer Syntax
Sample
<serviceProxy port="2000"> <balancer> <xmlSessionIdExtractor namespace="http://chat.predic8.com/" localName="session" /> <nodes> <node host="node1.predic8.com" port="8080" /> <node host="node2.predic8.com" port="8090" /> <node host="node3.predic8.com" port="8100" /> </nodes> <byThreadStrategy maxNumberOfThreadsPerEndpoint="10" retryTimeOnBusy="1000" /> </balancer> </serviceProxy>
Listing 2: balancer Example
Attributes
Name | Mandatory | Default | Description | Example |
---|---|---|---|---|
name | no | Default | Uniquely identifies this Load Balancer, if there is more than one. Used in the web administration interface and lbclient to manage nodes. | balancer1 |
sessionTimeout | no | 3600000 | Time in milliseconds after which sessions time out. (If a session extractor is used.) Default is 1 hour, 0 means never. | 600000 (10min) |
Child Elements
Name | Cardinality | Description |
---|---|---|
byThreadStrategy | 0..1 | Sets the balancer strategy to thread based. |
clusters | 0..1 | Specifies a list of clusters. |
jSessionIdExtractor | 0..1 | Extracts JSESSIONIDs. |
roundRobinStrategy | 0..1 | Sets the balancer strategy to round robin the nodes. |
xmlSessionIdExtractor | 0..1 | Specifies local name and namespace of session element. |