.NET Architecture & System Design Interview Question #73

What is read-your-writes consistency?

Database Scaling, Partitioning, NoSQL & Data Consistency Mid-Level Intermediate

Quick Interview Answer

Read-your-writes consistency guarantees that after a client successfully writes data, that same client will not subsequently observe an older version through the relevant read path.

Detailed Explanation

Read-your-writes consistency guarantees that after a client successfully writes data, that same client will not subsequently observe an older version through the relevant read path.

This guarantee is useful in user-facing workflows where saving a change and immediately seeing the old value would be confusing. It can be implemented by routing certain reads to the primary, using session-aware routing, or waiting for a replica to catch up.

Code Example

Client writes Profile = New
       |
next client read
       |
must not return Profile = Old