rohitasave avatar image
rohitasave asked Erick Ramirez commented

Do I have to run nodetool repair -pr on all the nodes in cluster?

I have 7 node Apache Cassandra 3.11.6 running in Production.

As it is recommended to run nodetool repair -pr once every gc_grace_seconds, do I have to run this command on all nodes?

As well as can I run this command on multiple nodes at a given time? Like, if I run this on 3 nodes at a single time, then another 3 nodes and so on.

Also, is it mandatory to start with Seed node or can I take any one node from cluster to begin with?

10 |1000

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

The partitioner range repair (repair -pr) only repairs token ranges owned by the node. This means that token ranges owned by other nodes won't get repaired unless you run repair on those nodes so it is necessary to run repair -pr on all nodes in all data centres in the cluster.

We recommend that you run repairs one node at a time otherwise it can affect the performance of your cluster particularly during peak periods. Repair is an expensive operation and can use a lot of resources (CPU, memory, disk IO, network IO) so we don't advise running it on multiple nodes.

It isn't necessary to start with seed nodes. Since all Cassandra nodes are the same, you can pick any node you want.

As a side note, it can take a lot of time manually running repairs so we recommend you use Reaper to automate your repairs. It is fully open-source so it's free to use. Cheers!

2 comments Share
10 |1000

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

rohitasave avatar image rohitasave commented ·
Thank you @Erick Ramirez for your guidance. I appreciate your help on this.
0 Likes 0 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ rohitasave commented ·
Not a problem. Happy to help. Cheers!
0 Likes 0 ·