NEW
A formal set of guarantees defining the visibility and ordering of updates in shared or replicated data systems.
DESCRIPTION
Consistency models specify what reads can observe in the presence of concurrent updates and replication. Strong consistency (e.g., linearizability) maximizes predictability, while eventual and causal consistency trade strictness for availability and performance. Cloud databases often expose tunable levels to balance latency and correctness. Selecting a model affects application logic, user experience, and failure handling. Understanding guarantees like read-your-writes and monotonic reads prevents surprising anomalies.
ALTERNATIVE DEFINITIONS
Wikipedia
In distributed systems, a consistency model is a contract between programmers and a system, stating the results of read operations after a series of writes.
Frames consistency as a programmer-system contract about read results.
Microsoft
Azure Cosmos DB provides five well-defined consistency levels that enable you to make precise tradeoffs between consistency, availability, and latency.
Emphasizes practical tunable levels and trade-offs in a managed database.
AWS
Amazon DynamoDB supports eventual consistency and strongly consistent reads to help you balance read performance with consistency needs.
Contrasts two common levels in a popular NoSQL service.
RELATED TERMS
Linearizability Sequential Consistency Causal Consistency CAP Theorem Quorum Read-Your-Writes Monotonic Reads Lamport Clock
COMPETING TERMS
Strong Consistency Eventual Consistency
RELATIONS
KNOWLEDGE AREAS
Data Architecture Data Storage & Operations Real-time & Streaming Data Data Engineering
TARGET AUDIENCE
Software Developer Data Engineer Data Architect Cloud Architect
EXTERNAL SOURCES
- Wikipedia - Consistency model
- Microsoft - Cosmos DB consistency levels guide
- AWS - DynamoDB read consistency overview
- Jepsen - Explanations of consistency models and anomalies
TOP QUESTIONS
Why does a Consistency Model matter for application design?
It defines what data users see after writes, affecting UX, correctness, and retry logic. The chosen model shapes data access patterns and invariants.
Category: Relevancy
What is the difference between strong and eventual consistency models?
Strong consistency provides read-after-write globally, while eventual consistency only guarantees convergence over time. The latter favors availability and low latency.
Category: Comparison
How do causal and sequential consistency differ?
Causal preserves causally related order; sequential preserves a global order that all processes agree on, but not necessarily real-time.
Category: Concepts
What are common pitfalls when using eventual consistency?
Assuming immediate read-your-writes, performing non-idempotent retries, and failing to handle write-write conflicts lead to anomalies.
Category: Mistakes
How do quorums influence consistency guarantees?
Read/write quorum sizes determine overlap that ensures the latest value is observed, trading off latency and fault tolerance.
Category: Technical
Can I change consistency per request?
Some systems like Cosmos DB allow per-request or per-collection consistency, enabling fine-grained trade-offs.
Category: Management
What metrics help validate a Consistency Model in production?
Track staleness windows, read-your-writes violations, replication lag, and conflict rates to validate expected guarantees.
Category: Validation
How does CAP theorem relate to consistency models?
CAP frames trade-offs under partitions; consistency models express the concrete read/write guarantees chosen within those constraints.
Category: Concepts
What testing tools exist for consistency verification?
Jepsen-style tests inject faults and analyze histories for anomalies, revealing violations of claimed guarantees.
Category: Testing