api:
port: 2000
flow:
- balancer:
name: DemoBalancer
priorityStrategy: {}
clusters:
- name: PROD
nodes:
- host: node1.predic8.com
port: 8080
- host: node2.predic8.com
port: 8090
api:
port: 2000
flow:
- balancer:
name: DemoBalancer
priorityStrategy: {}
clusters:
- name: PROD
nodes:
- host: node1.predic8.com
port: 8080
- host: node2.predic8.com
port: 8090
Syntax
balancer:
'$ref': <string>
byThreadStrategy: {}
clusters:
- <cluster>
faultMonitoringStrategy: {}
jSessionIdExtractor: {}
name: <string>
priorityStrategy: {}
roundRobinStrategy: {}
sessionIdExtractor: {}
sessionTimeout: <number>
trackNodeStatus: <boolean>
xmlSessionIdExtractor: {}
balancer:
'$ref': <string>
byThreadStrategy: {}
clusters:
- <cluster>
faultMonitoringStrategy: {}
jSessionIdExtractor: {}
name: <string>
priorityStrategy: {}
roundRobinStrategy: {}
sessionIdExtractor: {}
sessionTimeout: <number>
trackNodeStatus: <boolean>
xmlSessionIdExtractor: {}
Attributes
| Name | Required | Default | Description | Examples |
|---|---|---|---|---|
| $ref | false | - | Reference a component defined under components. | - |
| 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) |
| trackNodeStatus | false | false | Whether to track the per-node result on every Exchange. | - |
Child Structure
| Element | Cardinality | Description |
|---|---|---|
| byThreadStrategy | 0..1 | |
| cluster | 0..* | Specifies a list of clusters. |
| faultMonitoringStrategy | 0..1 | Monitors the outcome of requests to each node to quickly disable/re-enable faulty ones. |
| jSessionIdExtractor | 0..1 | The jSessionIdExtractor extracts the JSESSIONID from a message and provides it to the {@link Balancer}. |
| priorityStrategy | 0..1 | Dispatch strategy that selects cluster nodes based on ascending priority and health. Nodes are grouped by ascending priority. The highest-priority group with one or more healthy nodes (status UP) is chosen. If multiple nodes are healthy at that priority, one is selected at random. If no nodes are UP, falls back to the first node in sorted order. |
| roundRobinStrategy | 0..1 | |
| sessionIdExtractor | 0..1 | Sets the strategy used to extract a session ID from incoming HTTP requests. |
| xmlSessionIdExtractor | 0..1 | Extracts a session ID from an XML HTTP request body based on the qualified name of an XML element. |