← projects

systems · sub-star

nexus_cluster

raft consensus from the paper: elections, log replication, a replicated key-value store.



readme

The Raft consensus algorithm in Python, running as five processes over TCP: leader election, log replication, and a key-value store that survives the leader being killed. The algorithm is a state machine with no I/O at all, so the same file runs behind asyncio sockets, inside a deterministic simulation that checks Raft’s safety properties every 5 ms, and in the browser under Pyodide.

artifact

simulated cluster: heartbeats, an election timeout, and a new leader.

signal log

built with

PythonRaftasyncioPyodide

open the live demo →
view repository →