What should be the replication factor for QUORUM consistency ? Should it be 2 or 3 ?
What should be the replication factor for QUORUM consistency ? Should it be 2 or 3 ?
As Erick Ramire from datastax said on this post https://community.datastax.com/questions/4912/consistency-1.html , the best practice for read and write consistance is to use replication factor of 3 with QUORUM consistency.
@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.
Our general recommendation is to configure 3 replicas in each data centre which means that you need a minimum of 3 nodes in each data centre.
In almost all cases, the correct consistency level to use is LOCAL_QUORUM
. There are limited edge cases where other consistency levels are appropriate.
For more info, see Data replication in Cassandra. Cheers!
6 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use