1. A new server/node will start as Passive, meaning it is not part of any cluster yet.
Learn how to add a node to a cluster in: Setting a Cluster.
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. A node will become a Member of the cluster if not specified otherwise.
5. A node will become a Watcher if specified when adding the node.
6. A Member can be
Demoted to a Watcher.
7. A Watcher can be
Promoted to a Member. It will first become Promotable and a Member thereafter.
8. A 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.
Elections can occur when:
9. When the voting is over and a new Leader is elected, one node will become a Leader and the rest will go back to being Members.
- A Watcher does not take part in the voting process.
- During elections, a Watcher enters a waiting state until elections are over.