DEV Community

Cover image for Sharding in CouchDB: Reducing the Number of Shards
Maddy for Neighbourhoodie

Posted on • Originally published at neighbourhood.ie

Sharding in CouchDB: Reducing the Number of Shards

In contrast to increasing the number of shards for a database, reducing the number of shards is not a built-in operation. In addition, as shard splitting is only available in CouchDB 3.x and later, this advice is good for version 2.x as well.

couch-continuum

Neighbourhoodie has built the couch-continuum tool that automates the bulk changing of database parameters, including the number of shards for a database.

This tool can both increase and decrease the number of shards for a database in both CouchDB 2.x and 3.x.

There is just one caveat: it can not operate without taking the original database offline for the duration of its restore. So you can only do this during a maintenance window.


Discover more ways to keep your CouchDB project efficient on the Neighbourhoodie blog, where we regularly publish tips like this, plus guides and tutorials.

Top comments (0)