0

Let's say you have three servers A, B and C

There is a network partition between A and C.

During leader election the following steps might happen:

a) A encounters a timeout and start a new election with term 1. B responds to the vote request and A becomes the leader.

b) After some time C starts a new election with term 1, but since B already voted for A for term 1, it refuses to vote for C and the leader election for C fails due to timeout.

c) Another timeout for C occurs and it starts a leader election for term 2. In this case B accepts C as a leader since it has a higher term and C becomes the leader.

d) Similarly later A starts and election for term 3 and the leadership alternates between A and C.

Wouldn't this stall progress? Am I missing something here?

g. arshad
  • 21
  • 4

1 Answers1

0

If A can reach B and C can reach B then A and C are not in a network partition.

If a node or a group of nodes is unreachable from another node or a group of nodes, then there is a network partition between those two nodes/groups of nodes.

msantl
  • 371
  • 2
  • 6