Review cards · 15 cards
Replication
Leaders and followers, synchronous and asynchronous copies, and replication lag.
Cards
- Why is replication between distant regions usually asynchronous?
- A database is overloaded by writes. Why does adding read replicas not help?
- A primary takes 5,000 writes/s and replicates asynchronously, with the follower about 2 seconds behind. The primary's disk dies and the follower is promoted. Roughly how many acknowledged writes are lost?
- Replicating a disk to a standby versus replicating at the application level: what does the second give you?
- How do reads and writes work in leaderless (Dynamo-style) replication?
- A user sees a new comment, refreshes, and it is gone, because the second read went to a replica further behind. The guarantee that prevents this is _____.
- When a quorum read finds a replica with an older version and writes the newer value back to it, that is _____. A background process that compares replicas using _____ to find and fix differences is called anti-entropy.
- A user updates their profile, reloads, and sees the old version because the read went to a lagging replica. That breaks _____ consistency.
- Synchronous vs asynchronous replication: what does each give up?
- How long should followers wait without hearing from the leader before failing over? What does each choice risk?
- Replicas resolve conflicts with last write wins by timestamp. What can go wrong?
- With a leader in each region, what new problem appears, and how is it handled?
- After a failover with async replication, the old leader comes back with writes the new leader never got. What happens to them, and why is that risky?
- A leader has three followers. Which setup keeps writes fairly fast but still guarantees that every acknowledged write is on at least two machines?
- The old leader is cut off by a network partition, a follower is promoted, and now both accept writes. What prevents this split brain?
More topics
- Estimation 21 cards
- Networking 16 cards
- API design 17 cards
- Caching 21 cards
- Databases 22 cards
- Sharding 18 cards
- Consistency 19 cards
- Queues 18 cards
- Streaming 18 cards
- Availability 14 cards
- Resilience 16 cards
- Storage 14 cards
- Realtime 15 cards
- Data structures 16 cards
- Security 17 cards
- Observability 18 cards
- Coordination 16 cards