'How to choose the number of shards and replicas for a single node couchdb?

I have a single server running the CouchDB 2.3.1 database and there is a huge amount of data in that. But the storage space on the server is getting full sooner than it should be. When I checked the value of no of shards and replicas in CouchDB config, It was set to the default values which are q=8 and n=3, that is there will be 8 shards and 3 replicas of each document. I think this is the reason my storage is getting full.

Is it okay to run the CouchDB with q=2 and n=1, If I am okay with some downtime if the node goes down?

Also, If I change the configurations now, will the extra replicas be deleted or Is there anything I have to do for that?



Solution 1:[1]

If you change q and n after DB was created this will have no effect. You will have to reshard your db manually:

https://docs.couchdb.org/en/3.1.1/config/resharding.html

Regarding q=2 and n=1 this will work. Also depending on the size of your DB you might even get away with q=1 (one shard)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vincnetas