Close popover

Table of Contents

Configuring the replication factor

Version:

Ensure reliability and fault tolerance by controlling how many data replicas you want to store across a Cassandra cluster.

The replication factor is the total number of replicas for a keyspace across a Cassandra cluster. A replication factor of 3 means that there are three copies of each row, where each copy is on a different node and is equally important.

By setting a high replication factor, you ensure a higher likelihood that the data on the node exists on another node, in case of a failure. The disadvantage of a high replication factor is that write operations take longer.

Determine the optimal replication factor setting that prevents data loss in case multiple nodes in the Cassandra cluster fail. For more information, see Impact of failing nodes on system stability.
  • To change the default replication factor, open the prconfig.xml file and modify the dnode/default_keyspaces property.

    The default setting for all keyspaces is 3:

    data=3,vbd=3,states=3,aggregation=3,adm=3,adm_commitlog=3

  • Impact of failing nodes on system stability

    Learn how the number of functional nodes and the current replication factor affect system stability when some of the Cassandra nodes are down.

  • Configuring the consistency level

    Achieve the level of consistency that you want by deciding how many Cassandra nodes in a cluster must validate a write operation or respond to a read operation to declare success.

  • Verifying the keyspace replication factor

    Troubleshoot keyspace-related errors, such as incorrect replication, by checking whether a specific keyspace exists and whether the keyspace belongs to the correct data center.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.