Consensus and replicated logs
medium 4 minConsensus allows a replica group to agree on an ordered history across leader changes.
Video lesson · Chapter 1 of 5
Deployment eleven is installed
When does the third copy make a log entry safe?
1:13Reel
Theory
Read or listen first. About 1 min.
What it is
A leader can have a new entry in its own log before that entry is committed. For an entry from its current term, the leader tracks how many voters have durably replicated it.
A five-voter Raft log at index 12
Why it exists
In a five-voter group any two majorities overlap. Together with Raft’s election and log rules, that overlap protects committed history through leadership changes.
Words to know
- Commit index
- The highest log position a server knows is committed.
How it works
Step through the idea, or press Play.
Split five voters. Three can still communicate; two are isolated.
Understand it
Worked example
Consensus and replicated logs in practice
With five voters, three can form a majority. A split into three and two can leave the three-node side able to progress. The two-node side cannot independently commit conflicting entries.
Related case
What can a disconnected region promise?
Three regions replicate a directory of active deployment versions. A network split leaves one region isolated. Engineers need to know which reads and writes may still succeed.
Fast reads can include a revision and age.