coordination
Leader Election
Elect the highest-priority alive node as leader. Bully algorithm simulation.
current leaderNode-3
alive nodes3/3
elections0
👤
Node-1
priority: 1
follower
👤
Node-2
priority: 2
follower
👑
Node-3
priority: 3
LEADER
Algorithm: Bully (highest priority wins)
Click nodes to toggle alive/dead • Elections run automatically
or click nodes to simulate failures
// event log
No events yet
How It Works
- Each node has a priority (higher = more preferred)
- Only alive nodes participate in election
- Node with highest priority becomes leader
- If leader fails, re-election happens automatically
Use Cases
- Distributed coordination (ZooKeeper, etcd)
- Database master election
- Cluster management
- Consensus protocols (Raft, Paxos)