Review cards · 18 cards

Replication

Leaders and followers, synchronous and asynchronous copies, and replication lag.

Train replication in daily review

Cards

  1. Why is replication between distant regions usually asynchronous? easy Multiple choice
  2. A database is overloaded by writes. Why does adding read replicas not help? easy Flashcard
  3. 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? medium Estimate
  4. A config system sends every write through one root, which numbers the changes in order for its replicas. What does the single writer buy, and what must you add because of it? medium Flashcard
  5. Replicating a disk to a standby versus replicating at the application level: what does the second give you? medium Flashcard
  6. How do reads and writes work in leaderless (Dynamo-style) replication? medium Flashcard
  7. 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 _____. medium Fill in the blank
  8. 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. medium Fill in the blank
  9. Reads peak at 60,000/s and one MySQL replica serves 20,000 reads/s. Keeping each replica at or under 75% even while one replica is down, how many replicas do you need? medium Estimate
  10. A user updates their profile, reloads, and sees the old version because the read went to a lagging replica. That breaks _____ consistency. medium Fill in the blank
  11. Synchronous vs asynchronous replication: what does each give up? medium Flashcard
  12. How long should followers wait without hearing from the leader before failing over? What does each choice risk? hard Flashcard
  13. Replicas resolve conflicts with last write wins by timestamp. What can go wrong? hard Multiple choice
  14. With a leader in each region, what new problem appears, and how is it handled? hard Flashcard
  15. 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? hard Flashcard
  16. Related reads share an id, and hash(id) % N over the replicas picks the same replica for all of them. One replica goes down. How should the pick change so that other ids keep their replica? hard Multiple choice
  17. A leader has three followers. Which setup keeps writes fairly fast but still guarantees that every acknowledged write is on at least two machines? hard Multiple choice
  18. The old leader is cut off by a network partition, a follower is promoted, and now both accept writes. What prevents this split brain? hard Multiple choice

More topics