-
Notifications
You must be signed in to change notification settings - Fork 65
Clustering
Admiral is based on VMware's Xenon framework. Xenon provides an operationally simple model to federate several nodes (Xenon service hosts) to form a node group. A node group provides high availability, scale out and the ability to dynamically expand / contract. For more details check Xenon Multi Node Tutorial.
In order to cluster two or more admiral hosts an additional parameter "--peerNodes" has to be provided when host is starting. Let's assume that admiral is running on localhost on port 8000. The following command will start a second admiral host on port 8001 and join the two instances in a cluster.
java -jar admiral-host-*-uber-jar-with-agent.jar --port=8001 --bindAddress=0.0.0.0 --peerNodes=http://127.0.0.1:8000,http://127.0.0.1:8001
For more information: Node Join At Startup
The state of the node group, including node availability is available through the REST API of the node group service. Using curl on the terminal or your browser issue a GET:
$ curl http://localhost:8000/core/node-groups/default
Sample output:
{
"config": {
"nodeRemovalDelayMicros": 3600000000,
"stableGroupMaintenanceIntervalCount": 5
},
"nodes": {
"hostAtPort8000": {
"groupReference": "http://127.0.0.1:8000/core/node-groups/default",
"status": "AVAILABLE",
"options": [
"PEER"
],
"id": "hostAtPort8000",
"membershipQuorum": 1,
"synchQuorum": 2,
"documentVersion": 2,
"documentKind": "com:vmware:xenon:services:common:NodeState",
"documentSelfLink": "/core/node-groups/default/hostAtPort8000",
"documentUpdateTimeMicros": 1453338214662000,
"documentExpirationTimeMicros": 0
},
"hostAtPort8001": {
"groupReference": "http://127.0.0.1:8001/core/node-groups/default",
"status": "AVAILABLE",
"options": [
"PEER"
],
"id": "hostAtPort8001",
"membershipQuorum": 2,
"synchQuorum": 2,
"documentVersion": 2,
"documentKind": "com:vmware:xenon:services:common:NodeState",
"documentSelfLink": "/core/node-groups/default/hostAtPort8001",
"documentUpdateTimeMicros": 1453338279309033,
"documentExpirationTimeMicros": 0
}
},
"membershipUpdateTimeMicros": 1453338225178007,
"documentVersion": 87,
"documentKind": "com:vmware:xenon:services:common:NodeGroupService:NodeGroupState",
"documentSelfLink": "/core/node-groups/default",
"documentUpdateTimeMicros": 1453338279310007,
"documentUpdateAction": "PATCH",
"documentExpirationTimeMicros": 0,
"documentOwner": "hostAtPort8000",
}