September 2, 2026
RaftViz: visualizing Raft for the classroom
Consensus is the part of my Distributed Systems course where students’ eyes glaze over. Not because the idea is hard — a group of processes agreeing on one thing — but because the mechanism is relentless: terms, votes, log freshness checks, quorums, commit indices. Pseudocode on a slide tells you what happens; it doesn’t let you watch it happen.
So I built something that does both at once. I recently published RaftViz, an interactive, step-by-step visualization of the Raft consensus algorithm, in which every animated event is wired to the exact line of lecture-notes pseudocode that produced it. Students can step through a leader election one line at a time, then crash the leader themselves and watch the cluster heal.
The twist: I wrote none of the code. Roughly 6,000 lines of JavaScript, all of it produced by AI coding agents under fairly tight direction. Read on for the pedagogical idea, a tour of what it does, an unexpected bug it found in the lecture notes it was built from — and what I learned about steering coding agents on a project where correctness actually matters.