HomeDistributed & Parallel ComputingThe Bully Algorithm: Electing a Leader in a Distributed System by Highest ID

👑 The Bully Algorithm: Electing a Leader in a Distributed System by Highest ID

Explore the classic Bully Algorithm for leader election in distributed systems, tracing the election and coordinator message flow, its message-complexity weaknesses, and how it compares to Raft.

Distributed & Parallel Computing3DModerate60 FPS
bully-algorithm-leader-election-lab ↗ Open standalone

This simulator visualizes how election and coordinator messages ripple through a set of numbered processes after a leader failure, showing exactly which nodes get bullied aside and which one ultimately wins.

🔬 What It Demonstrates

This simulator visualizes how election and coordinator messages ripple through a set of numbered processes after a leader failure, showing exactly which nodes get bullied aside and which one ultimately wins.

🎮 How to Use

Pick a process to fail or simulate a network partition, then watch the election messages cascade upward by ID and the coordinator announcement broadcast back down to the survivors.

💡 Did You Know?

In the worst case, when the lowest-ID process detects the failure, the Bully Algorithm can generate a number of messages that grows quadratically with the number of processes in the system.

⚙ Under the hood

Explore the classic Bully Algorithm for leader election in distributed systems, tracing the election and coordinator message flow, its message-complexity weaknesses, and how it compares to Raft.

distributed systemsleader electionbully algorithmconsensusraftfault tolerancenetworkingcomputer science

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)