Module 13 7 lessons 115 min
Replication in depth
With read replicas in place, new problems appear: the primary fails during a write, two nodes both act as leader, and an order is missing from one read and back in the next.
In this module
6 Read · 1 Lab
- 13.1Sync, async and failoverWhat happens when the leader fails: lost writes, split brain and fencing.Read15 min
- 13.2Leader election and RaftHow nodes agree on a leader and a log, and why you use etcd or ZooKeeper instead of implementing it.Read18 min
- 13.3Consistency modelsRead-your-writes, monotonic reads, linearizability and eventual consistency, with examples from the app.Read15 min
- 13.4Leaderless and quorumsDynamo-style replication: R + W > N, and what it does and doesn't guarantee.Read15 min
- 13.5Conflict resolutionLast-write-wins, version vectors and CRDTs.Read12 min
- 13.6CAP and PACELCWhat CAP says and doesn't say, and the latency vs consistency tradeoff you make every day.Read10 min
- 13.7Lab: Choose consistency levelsMenu, cart, payment, rider location: choose a consistency level for each and justify it.Lab30 min