Questions: Leader Election Algorithms

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A distributed system has five nodes (IDs 1–5). Node 3 suspects the leader has crashed and initiates a Bully election. Node 5 eventually wins. Later, due to a network partition, node 3 also declares itself leader. What property of leader election has been violated?

ALiveness — the system failed to elect a leader quickly enough
BSafety — at most one leader must exist at any time, but now two exist
CFairness — the highest-ID node should always win, but node 3 won instead
DTermination — the election did not complete within a bounded time
Question 2 Multiple Choice

The Bully algorithm generates O(n²) messages in the worst case. Why does this happen?

AEach node broadcasts to all others simultaneously, and all n nodes do this independently
BThe node with the lowest ID initiates, and each higher-ID node passes the baton to the next, requiring n rounds
CMultiple nodes can detect the leader's failure and each initiates an election, sending messages to all nodes with higher IDs
DThe algorithm requires two full ring traversals to confirm the elected leader
Question 3 True / False

Randomized election timeouts (as used in Raft) make it very unlikely that two nodes start elections simultaneously, but cannot guarantee it never happens.

TTrue
FFalse
Question 4 True / False

In the Ring algorithm, the node with the highest ID generally wins because it sends the most messages around the ring.

TTrue
FFalse
Question 5 Short Answer

Why is preventing 'split brain' considered more critical than guaranteeing that an election always completes quickly?

Think about your answer, then reveal below.