3.3. Configuring Clustering¶
3.3.1. Cluster Options¶
- 
[cluster]¶
- 
q¶
 - Sets the default number of shards for newly created databases. The default value, - 8, splits a database into 8 separate partitions.- [cluster] q = 8 - For systems with lots of small, infrequently accessed databases, or for servers with fewer CPU cores, consider reducing this value to - 1or- 2.- The value of - qcan also be overridden on a per-DB basis, at DB creation time.- See also - 
n¶
 - Sets the number of replicas of each document in a cluster. CouchDB will only place one replica per node in a cluster. When set up through the Cluster Setup Wizard, a standalone single node will have - n = 1, a two node cluster will have- n = 2, and any larger cluster will have- n = 3. It is recommended not to set- ngreater than- 3.- [cluster] n = 3 - 
placement¶
 - Warning - Use of this option will override the - noption for replica cardinality. Use with care.- Sets the cluster-wide replica placement policy when creating new databases. The value must be a comma-delimited list of strings of the format - zone_name:#, where- zone_nameis a zone as specified in the- nodesdatabase and- #is an integer indicating the number of replicas to place on nodes with a matching- zone_name.- This parameter is not specified by default. - [cluster] placement = metro-dc-a:2,metro-dc-b:1 - See also - 
seedlist¶
 - An optional, comma-delimited list of node names that this node should contact in order to join a cluster. If a seedlist is configured the - _upendpoint will return a 404 until the node has successfully contacted at least one of the members of the seedlist and replicated an up-to-date copy of the- _nodes,- _dbs, and- _userssystem databases.[cluster] seedlist = couchdb@node1.example.com,couchdb@node2.example.com
-