hardScenarioConceptMidSeniorStaff
Your service writes a record, reads it straight back, and sometimes gets the old value. What is happening and what do you change?
5 min readUpdated 2026-08-15Target archetype: Big Tech, Enterprise Captive, Product Startup
Answer
Short answer
An acknowledged write is only guaranteed on the replicas that acknowledged it, so a read served elsewhere can legitimately return the previous version. Locate the staleness - replica, secondary index or cache - then buy read-your-writes for that operation only, and price what it costs during a partition.
Was this answer helpful?
Likely follow-ups
- Two users update the same document in the same second and one change disappears. Same problem or a different one?
- How would you give read-your-writes to a client that reads through a cache you do not control?
- Your secondary index lags the base table. Which of your fixes still works, and which does not?
- What does a quorum read do during a network partition, and what do you tell the caller in that moment?
Related questions
- CAP says you must choose between consistency and availability under a network partition. What are you giving up, concretely?hardAlso on replication and quorum4 min
- A teammate says a saga can just roll everything back if step four fails. What is wrong with that, and what would you tell them to build instead?hardAlso on eventual-consistency5 min
- How do you choose between a document store, a key-value store, a wide-column store and a graph database for a new service?hardAlso on nosql5 min
- Two teams need the same customer data. Do you give them one shared database, or two copies that are allowed to disagree?hardAlso on replication6 min