SystemExpertsSystemExperts
Pricing

Patterns

35 items

Horizontal Scaling Pattern

15mbeginner

Retry with Backoff Pattern

15mbeginner

Replication Pattern

25mintermediate

Caching Strategies Pattern

25mintermediate

Persistent Connections Pattern

20mintermediate

Load Balancing Pattern

20mintermediate

Fan-out Pattern

20mintermediate

Fan-in Pattern

20mintermediate

Circuit Breaker Pattern

20mintermediate

Eventual Consistency Pattern

25mintermediate

Queue-based Load Leveling Pattern

20mintermediate

Bloom Filters Pattern

20mintermediate

Time-Series Storage Pattern

20mintermediate

Bulkhead Pattern

20mintermediate

Batch Processing Pattern

20mintermediate

Write-Ahead Log Pattern

20mintermediate

API Gateway Pattern

20mintermediate

Backend for Frontend Pattern

20mintermediate

Sidecar Pattern

20mintermediate

Idempotency Pattern

20mintermediate

Rate Limiting Pattern

20mintermediate

Backpressure Pattern

20mintermediate

Pub/Sub Pattern

25mintermediate

Strong Consistency Pattern

30madvanced

Conflict Resolution Pattern

25madvanced

Leader Election Pattern

25madvanced

Consensus Protocols Pattern

30madvanced

CQRS Pattern

28madvanced

LSM Trees Pattern

25madvanced

Sharding Pattern

25madvanced

Event Sourcing Pattern

30madvanced

Stream Processing Pattern

25madvanced

Change Data Capture Pattern

25madvanced

Distributed Locking Pattern

25madvanced

Two-Phase Commit Pattern

25madvanced
System Design Pattern
Consistencystrong-consistencylinearizabilityconsensuscorrectnesscoordinationadvanced

Strong Consistency Pattern

Linearizable operations for correctness guarantees

Used in: Banking, Inventory, Reservations|30 min read

Summary

Strong Consistency (Linearizability) guarantees that all operations appear to occur atomically and in total order. Once a write completes, all subsequent reads see that write. This provides the strongest correctness guarantee but comes at significant cost: lower availability during partitions, higher latency, and limited scalability. Essential for financial transactions and inventory management.

Key Takeaways

Linearizability: The Gold Standard

Linearizability means operations appear to occur instantaneously at some point between invocation and response. Once a write completes, all reads see that value or newer—never older.

CAP Theorem: Choosing CP over AP

Strong consistency requires choosing Consistency and Partition tolerance (CP). During partitions, the system sacrifices availability—nodes that cannot communicate with majority must refuse operations.

Consensus Protocols: Raft and Paxos

Achieving strong consistency requires consensus protocols like Raft or Paxos. These ensure all nodes agree on operation order, even during failures. They work by having a leader coordinate writes with majority acknowledgment.

Eventual consistency introduces complexity. Applications must handle stale reads, conflicting writes, and non-linearizable behavior. Strong consistency eliminates these concerns by guaranteeing all operations see consistent state.

Raft Consensus Protocol

Summary

Strong Consistency (Linearizability) guarantees that all operations appear to occur atomically and in total order. Once a write completes, all subsequent reads see that write. This provides the strongest correctness guarantee but comes at significant cost: lower availability during partitions, higher latency, and limited scalability. Essential for financial transactions and inventory management.

Key Takeaways

Linearizability: The Gold Standard

Linearizability means operations appear to occur instantaneously at some point between invocation and response. Once a write completes, all reads see that value or newer—never older.

CAP Theorem: Choosing CP over AP

Strong consistency requires choosing Consistency and Partition tolerance (CP). During partitions, the system sacrifices availability—nodes that cannot communicate with majority must refuse operations.

Consensus Protocols: Raft and Paxos

Achieving strong consistency requires consensus protocols like Raft or Paxos. These ensure all nodes agree on operation order, even during failures. They work by having a leader coordinate writes with majority acknowledgment.

Quorum Reads and Writes

Strong consistency often uses quorum-based replication: write to majority (W > N/2) and read from majority (R > N/2) where R + W > N. This ensures reads overlap with latest write.

Two-Phase Commit for Distributed Transactions

Strong consistency across multiple resources requires distributed transactions via Two-Phase Commit (2PC). 2PC has high latency and coordinator is single point of failure.

When Strong Consistency is Non-Negotiable

Some domains cannot tolerate inconsistency: financial transactions, inventory management, seat reservations, and distributed locking. For these, strong consistency is mandatory despite costs.

Pattern Details

Eventual consistency introduces complexity. Applications must handle stale reads, conflicting writes, and non-linearizable behavior. Strong consistency eliminates these concerns by guaranteeing all operations see consistent state.

Raft Consensus Protocol

Trade-offs

AspectAdvantageDisadvantage

Premium Content

Sign in to access this content or upgrade for full access.