Detailed comparison tables and decision matrices with metric explanations
Before diving into comparisons, let's understand what each metric means:
What it measures: How strong the consistency guarantees are.
What it measures: Whether operations must respect the order they actually occurred in real time.
What it measures: Whether all processes see operations in the same order.
What it measures: Whether cause-and-effect relationships are preserved.
What it measures: System's ability to remain operational during failures.
What it measures: How consistency requirements affect system performance.
Model | Strength | Real-time Order | Global Order | Causality | Availability | Primary Use Cases |
---|---|---|---|---|---|---|
Strict Serializable | Strongest | ✅ Required | ✅ Required | ✅ Preserved | ❌ Not Available | Banking, Financial Systems |
Linearizable | Very Strong | ✅ Required | ✅ Required | ✅ Preserved | ❌ Not Available | Configuration, Coordination |
Sequential | Strong | ❌ Not Required | ✅ Required | ✅ Preserved | ❌ Not Available | Distributed Caches |
Serializable | Strong | ❌ Not Required | ✅ Required | ✅ Preserved | ❌ Not Available | ACID Databases |
Snapshot Isolation | Medium-Strong | ❌ Not Required | ❌ Not Required | ⚠️ Partial | ⚠️ Limited | MVCC Databases |
Repeatable Read | Medium-Strong | ❌ Not Required | ❌ Not Required | ⚠️ Partial | ⚠️ Limited | SQL Databases |
Causal | Medium | ❌ Not Required | ❌ Not Required | ✅ Preserved | ⚠️ Limited | Social Media, Chat |
PRAM | Medium-Weak | ❌ Not Required | ❌ Not Required | ⚠️ Per-Process | ✅ Available | Distributed Systems |
Read Committed | Weak | ❌ Not Required | ❌ Not Required | ❌ Not Preserved | ✅ Available | Web Applications |
Monotonic Reads | Weak | ❌ Not Required | ❌ Not Required | ❌ Not Preserved | ✅ Sticky Available | Session-based Apps |
Read Your Writes | Weak | ❌ Not Required | ❌ Not Required | ❌ Not Preserved | ✅ Sticky Available | User Profiles |
Eventual | Weakest | ❌ Not Required | ❌ Not Required | ❌ Not Preserved | ✅ Totally Available | DNS, CDN |
Model | Dirty Read | Non-repeatable Read | Phantom Read | Write Skew |
---|---|---|---|---|
Strict Serializable | ❌ Prevented | ❌ Prevented | ❌ Prevented | ❌ Prevented |
Serializable | ❌ Prevented | ❌ Prevented | ❌ Prevented | ❌ Prevented |
Repeatable Read | ❌ Prevented | ❌ Prevented | ✅ Possible | ✅ Possible |
Snapshot Isolation | ❌ Prevented | ❌ Prevented | ❌ Prevented | ✅ Possible |
Read Committed | ❌ Prevented | ✅ Possible | ✅ Possible | ✅ Possible |
Read Uncommitted | ✅ Possible | ✅ Possible | ✅ Possible | ✅ Possible |
Model | Latency | Throughput | Network Overhead | Implementation Complexity |
---|---|---|---|---|
Strict Serializable | Very High | Very Low | Very High | Very Complex |
Linearizable | High | Low | High | Complex |
Sequential | High | Low | High | Complex |
Serializable | High | Low | Medium | Complex |
Snapshot Isolation | Medium | Medium | Medium | Medium |
Causal | Medium | Medium | Medium | Medium |
PRAM | Low | High | Low | Simple |
Read Committed | Low | High | Low | Simple |
Session Guarantees | Low | High | Low | Simple |
Eventual | Very Low | Very High | Very Low | Very Simple |
Google Spanner, FaunaDB, FoundationDB - Critical correctness requirements
etcd, Consul, Zookeeper - Coordination and leader election
PostgreSQL, MySQL - Traditional relational databases
MongoDB (with causal reads) - Preserve conversation flow
DNS, CDNs, Redis, DynamoDB - High availability priority
Cart: Eventual, Inventory: Linearizable, Payments: Strict Serializable
Answer these questions to find the right consistency model for your use case:
Examples: Banking, payments, inventory, medical records
Examples: Configuration systems, leader election, distributed locks
Examples: Distributed caches, replicated logs, event sourcing
Examples: Social media, chat, collaborative editing, forums
Examples: User profiles, shopping carts, personal settings
Examples: DNS, CDNs, analytics, caching, content delivery