The ring structure
Nodes are arranged in a logical ring: each knows its successor. When a node detects a missing leader it builds an Election message containing its own id and forwards it to the next live successor.
- Each node receiving the message appends its own id and passes it on.
- When the message returns to the originator, it has collected every live id.
- The node with the highest id in the list is the new leader, announced in a second pass with a Coordinator message.
Why a ring
The ring bounds message count to about 2n in the normal case, far better than the bully worst case. The trade off is latency: the message must traverse the whole ring twice, once to gather ids and once to announce.
- Failures are handled by skipping a dead successor to the next live one.
- Concurrent elections converge because they collect the same set of ids and pick the same maximum.
Key idea
The ring algorithm circulates a list of ids twice and elects the maximum, trading higher latency for a tidy linear message count.