1. New server/node will start as Passive, meaning it is not part of any cluster yet. 2. When a node is added to a cluster, it immediately becomes the Leader if it is the only node in the cluster. 3. When a node is added to a cluster and a Leader already exists, it will become Promotable (on its way to either becoming a Member or a Watcher - depending on what was specified when created.) 4. Node will become a Member of the cluster if not specified otherwise. 5. Node will become a Watcher if specified when adding the node. 6. Member can be Demoted to a Watcher. 7. Watcher can be Promoted to a Member. It will first become Promotable and a Member thereafter. 8. Member (a regular Member or a Leader - but not a Watcher) can become a Candidate when a voting process for a new Leader takes place. 9. When voting is over and a new Leader is elected, one candidate becomes the Leader and the rest go back to being his Followers.
The Leader makes sure that decisions are consistent at the cluster level, as long as a majority of the nodes are functioning and can talk to the Leader.
For example, the decision to add a database to a node will be either accepted by the entire cluster (eventually) or fail to register altogether.
Raft Commands can't be accepted while there is no Leader or if the Leader is down.
Increase your RavenDB cluster by adding Watchers with the advantage of not suffering from large voting majorities and the latencies they can incur,
as watchers don't take part in majority calculations.
A Watcher can be assigned databases and tasks as a regular Member but is not included in the decisions making flow,
so cluster decisions can be made with a small majority of nodes while the actual size of the cluster can be much higher.
Any number of Watchers can be added to handle the workload.
Changing Node Type
Node types can be altered on the fly by using the following REST API calls: