Distributed Systems
Raft logs
Explain Raft log entries, how a majority commit makes an entry survive a leader change, and why an uncommitted entry can be overwritten, so clients must retry safely.
What you will be able to do
- Explain why a committed Raft entry survives a leader change.
- Decide how a client should handle a write that returned an error or a timeout.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Distributed Systems
- Vector clocksIntermediate · 5 min
Explain vector clocks, how an entry-by-entry comparison shows whether two versions are ancestors or concurrent, and why concurrent versions must be merged rather than…
- Leader electionIntermediate · 4 min
Explain leader election in Raft, where terms and majority votes allow at most one leader per term, and why a paused old leader still needs a check before it writes.
- Quorum reads and writesAdvanced · 4 min
Explain quorum reads and writes, how R plus W greater than N makes a read overlap the latest acknowledged write, and why that guarantee covers one key only.
- Split brain preventionAdvanced · 5 min
Explain how split brain happens when two nodes each take over during a partition, and how a majority rule, a witness and fencing prevent two active owners.
- Fencing tokensAdvanced · 4 min
Explain fencing tokens, where a resource rejects writes carrying an older token, and why a lock alone cannot stop a paused holder from writing after its lease has…
- LeasesAdvanced · 4 min
Explain leases as time-limited rights that holders renew, how Kubernetes uses Lease objects for node heartbeats and leader election, and why a delayed renewal looks…