// the take
An instructional, from-scratch Raft implementation in Go by Eli Bendersky, built incrementally across a 5-part blog series: leader election, log replication, persistence, and finally a working key/value store with exactly-once delivery semantics. It's for developers who want to actually understand Raft by reading and running code, not for anyone who needs a production consensus library.
Each part directory is a fully self-contained Go module with zero external dependencies in the Raft code itself (only a goroutine-leak test helper), so you can read part N in isolation without chasing abstractions across the repo. It ships a genuinely useful log-visualization tool (raft-testlog-viz) that turns test output into an HTML timeline of state transitions, which makes the notoriously hard-to-debug election/replication races actually observable. The progression from bare election (part1) to a real KV store with exactly-once delivery (part5) means you're not left with a toy — you see Raft used for something concrete.
Code is intentionally duplicated across part1 through part5 instead of factored into a shared library, which is fine for pedagogy but means a bug found in part2's election logic has to be manually checked and fixed in parts 3-5 too. There's no cluster membership change support (adding/removing nodes at runtime) anywhere in the series, which is one of the trickier and more commonly needed parts of real Raft deployments. It's explicitly not meant for reuse in production — no snapshotting for log compaction is discussed beyond part3's persistence, and there's no comparison or benchmarking against real-world implementations like hashicorp/raft or etcd/raft, so you won't learn where this diverges from what you'd actually run.
We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →