What should be the replication factor for QUORUM consistency ? Should it be 2 or 3 ?
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
@biswa333_125242 A cassandra read\write operation's consistency level specifies how many of the replicas need to respond to the coordinator (the node that receives the client’s read/write request) in order to consider the operation a success.
Generally when using a replication factor of two or higher, operations at level quorum are used to achieve consistency. A quorum is calculated, and then rounded down to a whole number, as follows:
quorum = (sum_of_replication_factors / 2) + 1
Here sum_of_replication_factors is the sum of RF of all the data centers in a cluster. Users can configure the RF for each DC in a cluster, depending on their operational needs.
sum_of_replication_factors = datacenter1_RF + datacenter2_RF + . . . + datacentern_RF
For example in a Single DC cluster, using a replication factor of 3, 2 nodes are required to achieve quorum consistency (
(3 / 2) + 1 = 2).
Please refer to our documentation for further details -> QUORUM
We strongly recommend a RF of 3 in a production cluster setting.
6 People are following this question.