An interactive explainer
No machine is in charge in advance. Any of them can lag or crash. Even so, the cluster returns a single ordered history that every server replays the same way. The trick is not trust. It is arithmetic. Watch a leader get elected the way a jury picks a foreman. Watch a command become law only once a majority has written it down. Then take the failure dial yourself. Kill one follower and the truth holds. Kill the majority and the system would rather stall than lie.
Consensus · Raft · Leader election · Quorum
Systems · Advanced · 12 min · Jury duty for servers — an interactive explainer on ViLearn, with a simulation and a knowledge check. All explainers.
Related: Why the ride you get is not the nearest car · Why one expired key takes down a database that was 20% busy · Why a log beats a queue when two teams want the same event