-
Notifications
You must be signed in to change notification settings - Fork 113
syncobj_admin
Filipp Ozinov edited this page Mar 24, 2020
·
3 revisions
syncobj_admin
is utility for monitoring cluster state and adding / removing cluster nodes. It is installed with PySyncObj from pip. It has folowing modes:
You can check each node status with folowing command:
syncobj_admin -conn localhost:1180 -status
You'll get different node parameters. Most usefull are:
-
state
- it can be one of the folowing:
0 - folower
1 - candidate
2 - leader
-
leader
- current cluster leader -
partner_nodes_count
- number of partner nodes -
partner_node_status
- statuses of connections to partner nodes:
0 - disconnected
1 - connecting
2 - connected
-
commit_idx
- last commited transaction number -
last_applied
- last applied transaction number -
version
- version of a library -
revision
- previous git commit hash -
uptime
- number of seconds that node process is alive
- Step 1: Add node with:
syncobj_admin -conn localhost:1180 -add localhost:1181
localhost:1180
is one of the existing cluster nodes, and localhost:1181
is the node you want to add.
- Step 2: Turn new node on. Pass ALL current cluster nodes to a new node (currently it could not detect cluster configuration automatically)
In case of switching from 1-node cluster to 2-node cluster, you don't need to wait untill syncobj_admin confirm - you will see confirmation as soon as you enable new node.
- Step 1: Turn existing node off
- Step 2: Remove node with:
syncobj_admin -conn localhost:1180 -remove localhost:1181
localhost:1180
is one of the nodes left in cluster, and localhost:1181
is the node you want to remove.