System Design
6. Distributed Systems FundamentalsAnimated
Split-Brain Problem
Two parts of a cluster both think they are in charge.
The idea
A partition makes both sides elect leaders, and they accept conflicting writes.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- leader
- candidate
- follower
- crashed
Five servers start as followers. Each waits for a heartbeat from a leader; if none arrives before a random timeout, it will stand for election.
1/10
Raft guarantees at most one leader per term and never loses committed entries.
Step by step
- 1Network splits
- 2Each side loses contact
- 3Both elect a leader
- 4Data diverges
Where it is used
Failover design.
Watch out for
Use majority quorums and fencing tokens.