Course contentsShow
← Computer Science
Lesson 2706 of 2,87260. Distributed Data and CommunicationFree lesson

Eventual Consistency in Practice: Dynamo and Cassandra

Analyzing real-world eventual consistency implementations including tunable consistency levels and quorum reads/writes.

Eventual Consistency in Practice: Dynamo and Cassandra

What you'll learn: How Amazon's Dynamo and Apache Cassandra implement eventual consistency with tunable guarantees in real production systems.

Real-World Implementations

Both Dynamo (Amazon's internal database) and Cassandra (its open-source descendant) demonstrate how eventual consistency principles translate into production-ready systems. Rather than forcing a single consistency model, they offer tunable consistency — letting you choose the right tradeoff per operation.

Tunable Consistency Levels

These systems use quorum-based reads and writes with configurable parameters:

  • N: Total number of replicas
  • W: Write quorum (replicas that must acknowledge writes)
  • R: Read quorum (replicas consulted for reads)

For eventual consistency, you might use W=1, R=1 (fast but potentially stale). For strong consistency, set W + R > N (e.g., W=2, R=2, N=3), ensuring read and write quorums overlap.

Coordination Techniques

Both systems combine multiple eventual consistency techniques you've learned:

  • Hinted handoff to handle temporary failures
  • Read repair to fix inconsistencies during queries
  • Anti-entropy using Merkle trees for background reconciliation
  • Vector clocks (Dynamo) or last-write-wins (Cassandra) for conflict resolution

The Practical Choice

Cassandra's consistency levels like ONE, QUORUM, and ALL let developers balance latency, availability, and consistency per query. A social media "like" count might use eventual consistency, while a financial transaction demands stronger guarantees — in the same database.

Key Takeaway: Dynamo and Cassandra prove eventual consistency isn't all-or-nothing; tunable quorums and reconciliation strategies let you dial consistency up or down based on each operation's requirements.