浏览 146
分享
4.3. Configuring Clustering
4.3.1. Cluster Options
[cluster]
Sets the default number of shards for newly created databases. Thedefault value,8
, splits a database into 8 separate partitions.- [cluster]
q = 8
For systems with lots of small, infrequently accessed databases, orfor servers with fewer CPU cores, consider reducing this value to1
or2
.
The value ofq
can also be overridden on a per-DB basis, at DBcreation time.
See also
httpdomain:put:PUT /{db} </{db}>
Sets the number of replicas of each document in a cluster. CouchDB willonly place one replica per node in a cluster. When set up through theCluster Setup Wizard, a standalone singlenode will haven = 1
, a two node cluster will haven = 2
, andany larger cluster will haven = 3
. It is recommended not to setn
greater than3
.- [cluster]
n = 3
Sets the cluster-wide replica placement policy when creating newdatabases. The value must be a comma-delimited list of strings of theformatzone_name:#
, wherezone_name
is a zone as specified inthenodes
database and#
is an integer indicating the number ofreplicas to place on nodes with a matchingzone_name
.
This parameter is not specified by default.- [cluster]
placement = metro-dc-a:2,metro-dc-b:1
See also
Placing a database on specific nodes
An optional, comma-delimited list of node names that this node shouldcontact in order to join a cluster. If a seedlist is configured the_up
endpoint will return a 404 until the node has successfully contacted atleast one of the members of the seedlist and replicated an up-to-date copyof the_nodes
,_dbs
, and_users
system databases.[cluster]seedlist = couchdb@node1.example.com,couchdb@node2.example.com
- [cluster]
评论列表