System Design
6. Distributed Systems FundamentalsAnimated
Network Partitions
Parts of the network cannot talk to each other.
The idea
A switch fails and nodes cannot see each other though all are running.
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
- 1Link fails
- 2Nodes cannot reach peers
- 3Minority side stops or diverges
- 4Heal and reconcile
Where it is used
Distributed design.
Watch out for
Partitions happen. Decide the behaviour in advance.