Tinker Replication & consistency

by Samy (Kondasamy Jayaraman) · drawn with Colorfigures by April Zhu

10:00. Each warehouse’s board is its own copy of the count.North 7/1, East 7/1, West 7/1

Chapter 1 of 7

One count, three copies

Larkspur’s stock count used to live in one database. Now each of its three warehouses keeps its own copy, so every region answers fast.

This chapter: When North sells a hinge, what do the other copies show?

About this chapter

You will learn

  • A replica is a copy of the same data in another place
  • Changes reach the other copies after a delay
  • Why a copy can answer with an old count

Words you’ll meet

Replica
One copy of the same data, kept in another place: here, each warehouse’s stock count.
Replication lag
The time a change takes to reach the other replicas.
Stale
Older than the newest change: a count that hasn’t heard about the latest sale.

Step 1 of 5

Each warehouse keeps a of the stock count. All three say 7 hinges.

Move the clock to 10:01.

New to databases? Databases & indexes comes first.