Replication aligns follower logs against a leader log.

highlighted = computed this step

Replicas follow the leader log

Leader-based replication starts with one leader log and follower logs. Each entry has an index, a term, and a value. Note: the render aligns entries by index across nodes.

replicated logs\text{replicated logs}

Cluster view

The compiled cluster has 3 nodes, and the leader log has 3 entries. Note: the log contents are shown only in the render.

nodes=3,leader entries=3\text{nodes}=3,\quad \text{leader entries}=3

a simplified leader-based log replication; quorum commit + log repair are exact on these tiny clusters; full Raft safety, leader election (next book), and network partitions/timing are beyond these traces - no product claims.

Replicated logs - quorum 2; committedIndex 2; divergent: F2nodeidx 1idx 2idx 3Lt1:at2:bt2:cF1t1:at2:bF1 repairt1:at2:bt2:cF2t1:at1:xF2 repairt1:at2:bt2:c

Summary

Replication is about which nodes hold the leader's log entries. Note: this is simplified leader-based replication; full Raft safety and leader election are the next book, while partitions and timing are beyond these traces.

leader log first\text{leader log first}