Reputation: 95
I am fairly new to Cassandra and found this website
https://www.ecyrd.com/cassandracalculator/
Not sure how accurate it is, but i have one misunderstanding.
Consider following example:
As a result i get that I can lose 4 nodes without impacting the application. Does anyone know what calculation leads us to this result? Thanks in advance.
P.S. I would like to remark that I am not interested in any other aspect, except "how many nodes I can loose without impacting application". The answer I am looking for is not how consistency works, or anything else, but exclusively what equation stands behind described result for "how many nodes I can loose without impacting application" and why.
Upvotes: 0
Views: 235
Reputation: 1538
You can tune consistency at query level also based on requirements. SELECT * FROM users WHERE state='ABC' USING CONSISTENCY QUORUM; Yes, CL ONE provides good availability than quorum but quorum will give you more consistent data.
Upvotes: 0
Reputation: 16400
A CL.ONE can always lead to the possibility of data loss. As an example: A replica as the coordinator gets requests, writes locally and sends ack to client. If that system is then hit by a meteor before the data to the other replicas has been sent theres data loss.
If you use local_quorum or quorum then with a RF=5 you can have 2 nodes of the replica set fail without any data loss (excluding cases like not following expected operational practices around repairs). However with CL.ONE your application can still run even if 4 of the 5 replicas died, in some cases availability is more important than the durability and consistency. I would recommend always start with quorum and then only change your consistency if theres an unmet availability of performance requirement.
Upvotes: 1