clutsering- support for auto drop/bring members when unavailable/available again #123
-
in case there are 2 nodes: if their network connection is broken, both nodes become follower and keep trying to be a candidate, none of them can serve anymore is it ok to just make them leader for a while until the connection is back? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @gooddaytocodeee , no, it's not possible. Raft algorithm ensures linearizable reads and consistent writes. To do this, the write must be accepted by the majority of nodes. For instance, the cluster consisting of 3 nodes requires at least 2 nodes for the consensus. For 2 nodes the majority is 2 nodes. Without the consensus, the leader cannot perform replication of a single write. Optionally, you can set |
Beta Was this translation helpful? Give feedback.
Hi @gooddaytocodeee , no, it's not possible. Raft algorithm ensures linearizable reads and consistent writes. To do this, the write must be accepted by the majority of nodes. For instance, the cluster consisting of 3 nodes requires at least 2 nodes for the consensus. For 2 nodes the majority is 2 nodes. Without the consensus, the leader cannot perform replication of a single write. Optionally, you can set
Partitioning
configuration option to true to keep the leader as long as possible even if it doesn't see the majority (see docs for more info). However, it will be an ephemeral leader which cannot process any write request due to absence of the majority.