DataStax Blog

Cassandra for Enterprise – Tuneable Consistency, it’s Your Choice.

By Matt Pfeil -  September 27, 2011 | 0 Comments

One of the stronger features of Cassandra is its ability to utilize tuneable consistency. There are two flavors of consistency – strong or eventual. With Cassandra, you can use either depending on your needs. This matters in a distributed system, where multiple copies of the same piece of data live on different physical servers in the system. Sometimes those servers are in the same data center; other times those servers are in different ones.

Strong consistency is the ability to guarantee an update is propagated to all locations where that piece of data resides. In a single data center set up, this would guarantee that all of the servers that should have a copy of the data will have it before the client is acknowledged with a success. In terms of performance, this usually means a cost of a few extra milliseconds to write data to several servers.

Eventual consistency means that the client is acknowledged as soon as part of the cluster acknowledges the write. In one case, a single server could acknowledge receiving the data and begin propagating the data to the other servers immediately. This use case would be the best when application performance matters the most. Data is replicated to other machines immediately, and this is especially useful for replication across Wide Area Networks (where latency costs may be high).

Because Cassandra offers tunable consistency, the choice is yours for strong or eventual consistency. You can even mix them – you could choose strong consistency for a local data center (where latency may have 1 ms) with eventual consistency to a remote data center (where latency could be 100 ms – or more). Cassandra offers the flexibility and power to satisfy any business need for your data store.



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>