Change Replication Factor for multiple ScyllaDB keyspaces at once!
Explore the docs »
Scylla replicates data according to a replication strategy that you choose. This strategy will determine the placement of the replicated data. The Replication Factor (RF) is equivalent to the number of nodes where data (rows and partitions) is replicated. Data is replicated to multiple (RF=N) nodes.
One can change the RF for all the keyspaces present in the scylla database but as the replication factor and replication strategy is associated with each keyspace separately, you need to change the RF for each keyspace one by one.
The script present in this project lets you change the replication factor of multiple keyspaces at once.
This is an example of how you can use this script to change the Replication factor of your scylla cluster.
- Atleast one scylla node running.
-
Clone this repo in the system where scylla node is running
git clone https://github.com/Aradhana-Singh/ScyllaDB-ReplicationFactor
-
Run the script file: scyllaScript.sh
./scyllaScript.sh
-
Following screen will appear. Choose the required options:
- Choose Option 1. To change replication factor for all the keyspaces except the system keyspaces.
- Choose Option 2. To change only the keyspaces created by alternator (all the keyspaces with names starting with "alternator_")
- Choose Option 3. To manually provide list of keyspaces (provide space separated list of names)
-
Provide the value for Replication factor, Replication Strategy and the name of Datacenter to change.
This might take a few minutes. Once the process completes you can check the new RF values for each keyspaces by using following cql command:
SELECT * FROM system_schema.keyspaces
-
It is recommended to do a node repair after changing the RF in scyllaDB. To do a full node repair use the following command:
Nodetool repair -full
email: aradhana971127@gmail.com
Project Link: https://github.com/Aradhana-Singh/ScyllaDB-ReplicationFactor