You write to the primary, immediately read from a replica, and get stale data because the replica hasn’t replicated yet. The fix: read-your-writes consistency — after a write, route reads to the primary for some TTL, OR use a synchronous cluster. The bug is rare but it bites at 3 a.m.
“Stickiness” key in cache: after write, store user_id -> “read primary for 5 sec”.
Or run on a strongly consistent cluster (spanner, etcd) and pay the latency.
Diagnose: compare write timestamp to replica replication lag (Prometheus metric).
client writes -> primary
client reads -> replica (stale!)
fix: stickiness / strong consistency
Read-your-writes is non-negotiable for UX. Default replicas to follow after a TTL, not forever.