HACKER Q&A
📣 KiranRao0

What's the difference between CRDT vs. Eventual Consistency?


Hi HN, I've seen several articles about CRDTs [1] lately and I don't fully understand how they're different from the concept of eventual consistency [2] in distributed computing.

[1]: https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type

[2]: https://en.wikipedia.org/wiki/Eventual_consistency


  👤 jka Accepted Answer ✓
Yep, they're closely related. Here's my attempt to distinguish the ideas, let me know whether this makes sense:

Eventual Consistency is a property that can be used to describe a datastore or an individual datastructure.

So we could say that, for example, "Cassandra is an eventually-consistent database", or that "the Elasticsearch cluster is eventually-consistent".

One of the core features of CRDTs is that they are, by design, always eventually consistent.

That's useful since it allows CRDTs to be used in environments where peers may temporarily go offline, and would like to catch up with other peer changes (and share their own) - eventually - when they are back online.