Single-leader
One node accepts writes. Followers copy it. Reads scatter.
Chapter 05 · Replication
You updated your profile, refreshed, and it was gone. Then it came back.
One database on three machines pretending to be one. Every trick to keep them in sync leaks.
Three acts: 1. lag 2. sync 3. topology
Same client, three replicas. One gets there late.
Three anomalies lag creates: read-your-writes your own write vanishes monotonic reads time appears to move backward consistent prefix you see effects before causes
Same write, plotted on time. Ack when?
Takeaway
Eventual consistency: your replicas will agree, just not right now.
One node accepts writes. Followers copy it. Reads scatter.
Two writers, same key, at once. Conflict is now your problem.
Write to w of n. Read from r of n. Quorum decides truth.
Three topologies · three answers to who accepts writes. Same client, same three replicas, different arrows.