2

On Cockroachdb, is it possible to configure the number of replicas per table or database?

Rima
  • 61
  • 4

1 Answers1

3

Yes. You can use the CONFIGURE ZONE subcommand to do so. For a database, you can configure your replicas using ALTER DATABASE <db> CONFIGURE ZONE USING num_replicas=<number>. For table, it would be same as above except replace DATABASE keyword with the TABLE keyword. You can view your replication zone setup using the SHOW ZONE CONFIGURATIONS query. Please refer to the docs for more information: https://www.cockroachlabs.com/docs/stable/configure-zone.html

Rima
  • 61
  • 4