AlgoViz

Introduction to data replication

easy 25 min

Replication keeps the same data on several machines and keeps the copies up to date.

What each level should show

The same question is judged differently for mid, senior and staff.

  • Mid

    Must show

    • Defines primary, replica, lag and failover
    • Routes writes to the primary
    • Knows a replica is not a backup

    Will be probed on

    • What a user sees during lag
    • Replication or sharding

    Stands out

    Says which reads must be current before being asked.

  • Senior

    Must show

    • Compares the three types with a reason
    • Shows that replicas do not scale writes
    • Names a conflict rule

    Will be probed on

    • Fallback when replicas fail
    • Synchronous does not mean fresh reads

    Stands out

    Uses numbers for the replica count and the spare.

  • Staff

    Must show

    • Chooses per kind of data
    • Plans regions and home regions
    • Includes backups and drills

    Will be probed on

    • Cost of cross-region copies
    • Path to sharding

    Stands out

    Argues for fewer copies or fewer leaders when the numbers allow it.