Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 20602200D1B for ; Thu, 12 Oct 2017 21:43:33 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1F0C91609E8; Thu, 12 Oct 2017 19:43:33 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 64DD01609E4 for ; Thu, 12 Oct 2017 21:43:32 +0200 (CEST) Received: (qmail 3910 invoked by uid 500); 12 Oct 2017 19:43:31 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 3901 invoked by uid 99); 12 Oct 2017 19:43:31 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2017 19:43:31 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id E78C885008; Thu, 12 Oct 2017 19:43:29 +0000 (UTC) Date: Thu, 12 Oct 2017 19:43:29 +0000 To: "commits@couchdb.apache.org" Subject: [couchdb-documentation] branch master updated: Document cluster config settings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <150783740904.5455.11924598389545037276@gitbox.apache.org> From: wohali@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: couchdb-documentation X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 35a4f9f307a2d3fc493fa32ad8a7e67056de4f79 X-Git-Newrev: 7b87d3ee386139d82b66d034fc0345968aa37468 X-Git-Rev: 7b87d3ee386139d82b66d034fc0345968aa37468 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated archived-at: Thu, 12 Oct 2017 19:43:33 -0000 This is an automated email from the ASF dual-hosted git repository. wohali pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git The following commit(s) were added to refs/heads/master by this push: new 7b87d3e Document cluster config settings 7b87d3e is described below commit 7b87d3ee386139d82b66d034fc0345968aa37468 Author: Joan Touzet AuthorDate: Wed Oct 11 18:46:44 2017 -0400 Document cluster config settings --- src/api/database/common.rst | 2 ++ src/cluster/databases.rst | 2 ++ src/config/cluster.rst | 71 +++++++++++++++++++++++++++++++++++++++++++++ src/config/index.rst | 1 + 4 files changed, 76 insertions(+) diff --git a/src/api/database/common.rst b/src/api/database/common.rst index 4c9f655..5f696ab 100644 --- a/src/api/database/common.rst +++ b/src/api/database/common.rst @@ -152,6 +152,8 @@ written as ``^[a-z][a-z0-9_$()+/-]*$``. :param db: Database name + :query integer q: Shards, aka the number of range partitions. Default is + 8, unless overridden in the :config:option:`cluster config `. :
header Content-Type: - :mimetype:`application/json` diff --git a/src/cluster/databases.rst b/src/cluster/databases.rst index 819228f..62edd3a 100644 --- a/src/cluster/databases.rst +++ b/src/cluster/databases.rst @@ -42,6 +42,8 @@ Deleteing a database curl -X DELETE "http://xxx.xxx.xxx.xxx:5984/database-name --user admin-user +.. _cluster/databases/placement: + Placing a database on specific nodes ==================================== diff --git a/src/config/cluster.rst b/src/config/cluster.rst new file mode 100644 index 0000000..51c007f --- /dev/null +++ b/src/config/cluster.rst @@ -0,0 +1,71 @@ +.. Licensed under the Apache License, Version 2.0 (the "License"); you may not +.. use this file except in compliance with the License. You may obtain a copy of +.. the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +.. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +.. License for the specific language governing permissions and limitations under +.. the License. + +.. default-domain:: config +.. highlight:: ini + +====================== +Configuring Clustering +====================== + +.. _config/cluster: + +Cluster Options +=============== + +.. config:section:: cluster :: cluster Options + + .. config:option:: 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 + ``1`` or ``2``. + + The value of ``q`` can also be overridden on a per-DB basis, at DB + creation time. + + .. seealso:: + httpdomain:put:`PUT /{db} ` + + .. config:option:: 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 + :ref:`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 + ``n`` greater than ``3``. :: + + [cluster] + n = 3 + + .. config:option:: placement + + 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_name`` is a zone as specified in + the ``nodes`` database 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 + + .. seealso:: + :ref:`cluster/databases/placement` diff --git a/src/config/index.rst b/src/config/index.rst index a906c5b..93dca8b 100644 --- a/src/config/index.rst +++ b/src/config/index.rst @@ -21,6 +21,7 @@ Configuring CouchDB intro couchdb + cluster couch-peruser http auth -- To stop receiving notification emails like this one, please contact ['"commits@couchdb.apache.org" '].