Nodes
Add, drain and remove nodes without stopping the service.
Every node runs the same binary. The cluster spreads replicas and leaders across them, so adding or removing one needs no manual data movement.
List the nodes
teseladb admin nodesAdd a node
Create a token on a node of the cluster and start the binary on the new machine with --join:
teseladb admin token create --ttl 1h
teseladb start --dbpath /var/lib/teseladb --join node-01:27100 --enroll-token <token>The node gets its certificate and starts receiving replicas. Step by step in Your first cluster.
Drain a node
Before shutting a machine down, drain it:
teseladb admin node drain <node_id>The node goes to Draining. The balancer takes its replicas and leaderships and, finally, its vote in Group 0. When no
replica is left, it closes its client port; drivers see it stop answering and go to another node. You cannot drain the
last active node.
Remove a node
When the drained node has no replicas and no vote in Group 0, remove it:
teseladb admin node remove <node_id>If it still has replicas, the error says how many and asks you to drain it first.
Rotate a node certificate
teseladb admin cert rotateThe node generates a new key and certificate, signed by the CA, without restarting.