Go to new doc!

+49 228 5552576-0


info@predic8.com

balancer

Description

Performs load-balancing between several nodes. Nodes sharing session state may be bundled into a cluster.

Can be used in

spring:beans, api, bean, if, interceptor, internalProxy, proxy, registration, request, response, serviceProxy, soapProxy, stompProxy, swaggerProxy, transport and wsStompReassembler

Syntax

				<serviceProxy port="9000">
					<adminConsole readOnly="[true, false]" />						
				</serviceProxy>				
			
Listing 12: adminConsole Example

Sample

				<serviceProxy port="2000">
					<balancer>
						<xmlSessionIdExtractor namespace="http://chat.predic8.com/"
							localName="session" />
						<clusters>
							<cluster name="Default">
								<node host="node1.predic8.com" port="8080" />
								<node host="node2.predic8.com" port="8090" />
								<node host="node3.predic8.com" port="8100" />
							<cluster>
						</clusters>
						<byThreadStrategy maxNumberOfThreadsPerEndpoint="10"
							retryTimeOnBusy="1000" />			
					</balancer>
				</serviceProxy>
			
Listing 12: balancer Example

Attributes

Name Required Default Description Example
name false 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 false 3600000 Time in milliseconds after which sessions time out. (If a session extractor is used.) Default is 1 hour, 0 means never. 600000 (10min)

Explanation

Child Elements

Position Cardinality Description Element
1 0..1 Sets the strategy used to extract a session ID from incoming HTTP requests. jSessionIdExtractor or xmlSessionIdExtractor
2 0..* Specifies a list of clusters. clusters
3 0..1 Sets the strategy used to choose the backend nodes. byThreadStrategy, faultMonitoringStrategy or roundRobinStrategy
4 0..1 Checks if nodes are still available. Sets them to "DOWN" when not reachable, else sets them back up when they are reachable. nodeOnlineChecker