‹ All demos
Raft consensus, live
The algorithm that keeps etcd and Kubernetes consistent. Five servers elect a leader and replicate a log — crash them and split the network while it runs.
How it works
- 1Each server is a follower, a candidate or the leader. If a follower hears nothing from a leader before its timer runs out, it starts an election.
- 2The leader copies client commands to the others and commits an entry once a majority has it. A minority on the wrong side of a network split can never commit.
- 3The same safety checks as the test suite run on every step: at most one leader per term, and every server applies the same commands in the same order.
- 4The test suite runs 40 random scenarios of crashes, restarts and partitions and checks those rules after every millisecond.
More demos
All demosLiveDatabases · Built from scratch
QueryLite: a SQL database
A SQL database written from scratch — parser, B+ tree indexes, a query planner, joins and transactions — running live on 22,000 rows in your browser.
Try it
LiveReal-time · Built from scratch
Live collaborative editor
Real-time editing with no server. Three devices share a note — take one offline, edit everywhere, reconnect, and they merge. Open a second tab and it syncs live.
Try it
LiveEveryday · Money
Split the bill
Add friends and who paid for what. Get the fewest payments that settle everyone — and copy it for WhatsApp.
Try it