Raft 03: Persistence

The Database build’s write-ahead log board: write it down, make the note survive, then act. A Raft node does the same thing with three small facts. Part of the Raft series, Build Your Own Raft.
Before you start. This series builds a small copy of Raft, the algorithm a group of machines uses to keep one shared list of commands. Raft 01: Leader Election picked a leader by votes and Raft 02: Log Replication copied its log to a majority. Both ran with every node held in memory. This stage makes a node able to be switched off and back on. The reasoning about “write it, then make it survive” is the one from Write-Ahead Log, including what fsync really promises.