Setting number of replicas on startup

Hi there,

I’m just wondering if there is a way to set num_replicas value on startup. I’ve found documentation on setting the number of replicas after the cluster has been setup, but wondering if there was a way to do this on startup, so when cockraoch start is initially ran.


Hi @Jeongp!

Unfortunately, there isn’t a way to configure the num_replicas value before startup.

As num_replicas is a cluster setting, you would have to start your nodes, initialize your cluster and only then run the following command.

Using a replication factor of 5 as the example:

ALTER RANGE default CONFIGURE ZONE USING num_replicas = 5;

This would change the replication factor to 5.

Let me know if there is anything else I can help you with.


Ah okay, got it. Thanks for the help!

1 Like