bully election algorithm - TarisMajor/5143-OpSystems GitHub Wiki

Bully Election Algorithm

The Bully Election Algorithm is a leader election algorithm used in distributed systems, where processes or nodes must decide on a coordinator or leader. The algorithm works by ensuring that the process with the highest ID becomes the leader. If a leader fails, the algorithm ensures that a new leader is elected.

Description:

If a process notices that the leader has failed, it initiates an election by sending an election message to all higher-ID processes. If a process receives an election message from a lower-ID process, it responds by initiating its own election if it has a higher ID. The process with the highest ID will be the new leader, and the other processes will accept this leader.

Key Points:

Works based on process IDs: Higher IDs have priority. No centralized control: Each process can initiate the election. Failure recovery: Ensures that a new leader is elected if the current one fails.

Source: Pease, C., Shostak, R., & Lamport, L. (1980). "The Bully Algorithm". ACM Transactions on Computer Systems.