Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 of 7
  1. 1. One copy is not enough
  2. 2. Three ways to say yes
  3. 3. Slow the network and kill the leader
  4. 4. When a leader crash loses acknowledged writes
  5. 5. What the replication log actually contains
  6. 6. How a follower falls hours behind
  7. 7. Check the failover and lag cases

Topic 7

Check the failover and lag cases

3 min read

Predict first

A leader acknowledges writes after one follower has them. The leader's machine is lost. The most up-to-date follower is promoted. Can an acknowledged write be lost?

Predict first

A user posts a comment and reloads. The page shows no comment. A moment later it appears. Which guarantee was broken?

Predict first

You pin every user to one follower. Which of these now holds?

Take away

  • Replication copies data to survive failures and to spread reads. It does not spread writes.
  • Asynchronous, semi-synchronous and synchronous replication trade write speed against lost writes and stale reads.
  • Lag is a window. Inside it, read-your-writes and monotonic reads keep one user’s view sensible, at some cost in leader load.

Sources

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms