DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

biswa333_125242 avatar image
biswa333_125242 asked ·

What is the replication factor for QUORUM consistency ?

What should be the replication factor for QUORUM consistency ? Should it be 2 or 3 ?

consistencyreplication factorrf
1 comment
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

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.

0 Likes 0 · ·

1 Answer

saravanan.chinnachamy_185977 avatar image
saravanan.chinnachamy_185977 answered ·

@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.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.