Module 5 6 lessons 79 min

When one database isn't enough

With the cache and ten servers in place, the database is the next thing to break at dinner. Copy it and send reads to the copies - then a customer places an order and the order page says it doesn't exist, and one night the primary's disk fails.

In this module

5 Read · 1 Lab

  1. 5.1Read replicasOur load test's next limit is the database. Keep writes on one primary, copy it, and send reads to the copies.Read12 min
  2. 5.2Replication lagCopies fall behind the primary. Why a customer can't find the order they just placed, and how to read your own writes.Read12 min
  3. 5.3When the primary diesPromote a replica: automatic or manual, the writes you can lose, and what “three nines” really allows.Read12 min
  4. 5.4Backups and recoveryA replica copies your mistakes too. Backups, point-in-time restore, and testing that a restore works.Read10 min
  5. 5.5Proof: one primary, two replicasThe load test that maxed out one database, run again with two replicas. Then we kill the primary and time the failover.Read8 min
  6. 5.6Lab: Add read replicas to the clinicThe database is the bottleneck. Add replicas, handle replication lag, and plan failover and backups.Lab25 min
Then · Module 6Live updates