Graph
Consistency

⚖️Consistency

NEW

A property of data systems that ensures reads reflect a defined state of data after writes, governed by a chosen consistency model.

DESCRIPTION

Consistency describes guarantees about visibility and ordering of updates in data systems. In databases, ACID consistency ensures transactions move the system between valid states. In distributed systems, models like strong, eventual, causal, or read-after-write define observable behavior of replicated data. Trade-offs with availability and partition tolerance follow the CAP theorem. Choosing the right model depends on application semantics, latency requirements, and failure scenarios.

ALTERNATIVE DEFINITIONS

Wikipedia

Consistency ensures that any transaction will bring the database from one valid state to another.

Frames consistency within transactional correctness and valid state transitions.

Source

Wikipedia

A consistency model is a contract between a data store and the programmer that specifies the visible effects of updates.

Defines consistency in distributed systems as visibility rules for updates.

Source

ACID CAP Theorem Strong Consistency Linearizability Serializability Isolation Replication Causal Consistency Read-after-write

COMPETING TERMS

Availability Eventual Consistency

RELATIONS

KNOWLEDGE AREAS

Data Storage & Operations Data Architecture Testing & Validation

TARGET AUDIENCE

Data Engineer Software Developer Data Architect Cloud Architect MLOps Engineer

EXTERNAL SOURCES

  • Wikipedia - Consistency model
  • AWS - Overview of consistency models
  • Google Cloud - Spanner read consistency options
  • Jepsen - Analysis of consistency guarantees

TOP QUESTIONS

What does Consistency mean in databases?

It ensures transactions move the database between valid states, preserving constraints and invariants under ACID principles.

Category: Definition

How does Consistency differ in distributed systems?

It defines update visibility rules across replicas, ranging from strong to eventual models with varying guarantees.

Category: Clarification

How does CAP Theorem relate to Consistency?

Under partitions, systems must trade off Consistency and Availability, selecting behavior aligned with application needs.

Category: Concepts

What is Strong Consistency?

All replicas reflect the latest write immediately from the client’s perspective, often via linearizable or serializable guarantees.

Category: Definition

What is Eventual Consistency?

Replicas converge to the latest state over time, tolerating temporary inconsistencies for higher availability and performance.

Category: Definition

What are common consistency mistakes?

Assuming strong semantics without verifying configuration, and neglecting write/read ordering constraints cause stale or inconsistent reads.

Category: Mistakes

What is the risk of choosing weak consistency?

User-visible anomalies and complex reconciliation can occur, requiring careful design and client-level compensations.

Category: Risk

How to pick a consistency model?

Evaluate correctness requirements, latency budgets, failure tolerance, and reconciliation costs; test under partition and retry scenarios.

Category: Guidance

How to validate consistency guarantees?

Use chaos testing, invariant checks, and workload simulation with monitoring to detect anomalies under failure conditions.

Category: Testing