Difference between Cassandra’s Consistency Level ANY and ONE

Just a short note this time. I’ve noticed that there’s a thing that some of the people miss when trying to understand Cassandra’s data model and the two “weakest” Consistency Levels for writes: ANY and ONE. What’s the difference? For CL.ONE it’s required that at least one replica responssible for a specific key, pointed by Partitioner, is able to receive a request and write the data. For CL.ANY it’s required that request is received by any node, including the node that is not responssible for a key. In this case Hinted Handoff will be used and data will by send to proper replicas when they’re available. However, keep in mind that it may happen, that a node that received such query will crash before any of the replica nodes will be able to receive a HH request. In this case, if you fail to recover that node (i.e. because of hardware failure) these data will be lost forever. You have been warned.

Comments are closed.