Replication Factor

4 min reading

ScyllaDB replicates data according to the replication strategy that you choose. This strategy will determine the placement of the replicated data. All nodes are equal: there are no primary or secondary nodes. The Replication Factor (RF) is equivalent to the number of nodes where data (rows and partitions) are replicated. Data is replicated to multiple (RF=N) nodes. An RF of one means there is only one copy of a row in a cluster, and there is no way to recover the data if the node is compromised or goes down. RF=2 means that there are two copies of a row in a cluster. An RF of at least three is used in most systems. Data is always replicated automatically. Read or write operations can occur to data stored on any of the replicated nodes.

Replication Factor three (RF=3): the coordinator, Node 4, sends a write to three replicas, Nodes 1, 2 and 5
Replication Factor three (RF=3): the coordinator, Node 4, sends a write to three replicas, Nodes 1, 2 and 5

In the example above, the client sends a write to Node 4, and the data is replicated to Nodes 1, 2, and 5. We have a Replication Factor (RF) of three. In this drawing, Node 4 is a coordinator node but not a replica node . However, replica nodes can also be coordinator nodes and often are.

During a read operation, the client sends a request to the coordinator, which reads from the replicas of the data. How many of the three replicas it waits for depends on the Consistency Level , covered next.

Knowledge Check

3 questions Pass 66%

Pass 66% to continue. No time limit; retake as many times as you need.

1. The Replication Factor (RF) determines:
2. Among the options in the list below, the highest availability will be achieved with:
3. A keyspace has RF=3 in a five-node cluster. How many nodes store a copy of a given row?
Back to course

Something wrong with this lesson? Tell us