Skip to content
Ameen Abozaid
Planned lessonSRC-007-L09

Demo: read replicas and the stale-read bug they introduce

  • Lesson 9 of 9
  • Senior C
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

reproduce and fix a read-after-write bug.

Draft outline details

Step by step

  1. Add a replica and route reads to it.
  2. Place an order, then immediately load "my orders"; the order is missing.
  3. Planned mistake: blame the cache. Fix: confirm replica lag in metrics; the read went to the replica.
  4. Implement read-your-writes: route recent writers to the primary or wait for the replica's position.
  5. Add lag monitoring and a fallback threshold.
  6. Add a test that fails when the stale read returns.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.