Skip to main content

> Term

stale read

An operation that returns outdated data because the read replica or cache has not yet synchronized with the primary data store.

Detailed Explanation

A stale read is the direct consequence of eventual consistency. When an application reads from a secondary node or a caching layer right after a write occurs on the primary node, the propagation delay might cause the older version of the data to be returned.

For many applications, this is acceptable for performance gains, but it can be disastrous for billing, inventory, or security-critical workflows.

Why It Matters

It forces developers to explicitly decide between speed (reading from a replica) and accuracy (forcing a read from the primary master node).

Common Failure Mode

A user buys an item, the application reads their account balance from a stale replica, and incorrectly allows them to make another purchase with money they no longer have.

Practical Example

Bypassing a replica to avoid a stale read for a critical operation.

Production Manifestation

Read replicas in RDS, Redis caching layers, and CDN edge nodes serving outdated HTTP responses.

Frequently Asked Questions

What is stale read in short?

An operation that returns outdated data because the read replica or cache has not yet synchronized with the primary data store.

What is the most common failure mode?

A user buys an item, the application reads their account balance from a stale replica, and incorrectly allows them to make another purchase with money they no longer have.

AI Summary

An operation that returns outdated data because the read replica or cache has not yet synchronized with the primary data store. It forces developers to explicitly decide between speed (reading from a replica) and accuracy (forcing a read from the primary master node).