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

 

question

Tri avatar image
Tri asked Erick Ramirez commented

Is there adverse effects to setting replication factor greater than the number of nodes?

Using Cassandra 3.11.10, 3 nodes cluster Cassandra allows to create a keyspace having `replication_factor` > 3. Is there any adverse effects?

-- successfully created Keyspace with RF = 3 > node count = 3
CREATE KEYSPACE mykeyspace WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 5 };
replication
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.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered Erick Ramirez commented

Yes, you will run into issues when you set the replication factor higher than the number of nodes.

For example, writes will fail since the coordinator cannot send the mutations to non-existent replicas. Similarly, reads can also fail since the coordinator cannot query non-existent replicas.

Other Cassandra operations such as repairs and bootstrapping can also fail. Cheers!

4 comments 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.

Then this sounds like a very bad idea to create a keyspace with RF > node count. How come Cassandra still accepts that "bad" CREATE KEYSPACE statement?

0 Likes 0 ·

I agree. The current CQL spec doesn't specify this level of validation. You're more than welcome to log a ticket for it. Cheers!

0 Likes 0 ·
Tri avatar image Tri Erick Ramirez ♦♦ ·

Filed CASSANDRA-16747 with a link to reference this discussion. Not sure if this is OK with DataStax community policy. If not please let me know. Thanks.

0 Likes 0 ·
Show more comments