Skip to content

Build a Raft KV Store

Implement the Raft consensus algorithm: leader election, log replication, log consistency, snapshots, membership changes, linearizable reads. The protocol behind etcd, Consul, CockroachDB, and TiKV — every modern distributed coordinator.

advanced12 lessons4 chapters12 graded exercisesPython

No sign-up needed for lesson 1 · certificate on completion · sign up to save progress

What you’ll have built

Chapter by chapter. Every step is a graded exercise.

  • Why Consensus
  • Leader Election
  • Log Replication
  • Production
Starts in Python — solve in the language you choose in the editor, same tests either way.

Curriculum

4 chapters, 12 lessons. Each lesson is a short read, one graded exercise, and a quiz.

  1. 1Why Consensus?Read · exercise · quiz
  2. 2Raft OverviewRead · exercise · quiz
Loading reference solution…