AlgoViz

Replication lag and stale reads

hard 7 min

Replication separates log creation, transport, durability on a replica and replay into visible state.

Where it shows up

The same pattern appears across everyday software.

  • A confirmed order vanishes on refresh

    An order creation succeeds and the next request returns no order. Trace the two requests to determine their serving nodes. Compare the write’s position with the selected replica’s replay position. Route the follow-up to a sufficiently caught-up replica or the primary when the session requires read-your-writes. Reserve replica reads for workloads that tolerate staleness.

  • Verifying the intervention

    Use a session position or route the follow-up appropriately. Confirm replica replay catches up. If the selected reader has applied the write, check transaction snapshot age, cache keys and whether the read targeted the correct tenant.