Chapter 6 of the story of the course, taken after chapter 7. Outline: (1) the invariant; (2) the lost-update race; (3) three strategies; (4) the flash-sale test and audit; (5) streaming replica and routing; (6) read-your-writes; (7) PgBouncer; (8) indexes; (9) synchronous replication, a crash, failover, split brain, pg_rewind; (10) the simulator.
The story of the course (2027.1 overview, "The story of the course"): chapter 6 opens with stateless services pushing every decision into the database. The labs take it after the cache of lab 5 (about 70% hits in one minute of a cold run, in a run for that lab).
The simulator sits after the read-your-writes experiment, at the top of Failover (opening on the crash) and at the end of section 5 (split brain, rejoin, switchback).