doJoinCluster vs addNode


#1

What is the difference between doJoinCluster and addNode REST APIs?

From the documentation:

addNode

Nodes are added to clusters with the POST /controller/addNode HTTP method and URI.

doJoinCluster

Nodes can be added to clusters with the POST /node/controller/doJoinCluster HTTP method and URI.


#2

‘addNode’ is a cluster (or a node in that cluster) reaching out to pull in a node, and ‘doJoinCluster’ is asking a node to join an existing cluster.


#3

Thank you.

Lets say I have a 2 node cluster. I want to add a third node to this cluster

  1. do I use doJoinCluster or addNode cluster?
  2. Say, I want to do graceful failover in maintenance mode - do I invoke addJoin or doJoinCluster to make the recently restarted nodes to join the cluster?

#4

@ingenthr Please answer @abhijat.upadhyay’s question about when to use one over the other. Thanks.


#5

FYI When I used the Web UI to initialize and configure a new node and choose the “Join Existing Cluster” option. It is sending a request to the /node/controller/doJoinCluster endpoint.