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 6F0DD200BB4 for ; Tue, 1 Nov 2016 15:44:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6D7B7160AF7; Tue, 1 Nov 2016 14:44:29 +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 B3C24160AE5 for ; Tue, 1 Nov 2016 15:44:28 +0100 (CET) Received: (qmail 30806 invoked by uid 500); 1 Nov 2016 14:44:27 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 30793 invoked by uid 99); 1 Nov 2016 14:44:27 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2016 14:44:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id DC7D2C057D for ; Tue, 1 Nov 2016 14:44:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.719 X-Spam-Level: X-Spam-Status: No, score=-0.719 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=messagingengine.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id LXVpBuicTsiR for ; Tue, 1 Nov 2016 14:44:24 +0000 (UTC) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 82DA35F2F0 for ; Tue, 1 Nov 2016 14:44:24 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5DBC620A91 for ; Tue, 1 Nov 2016 10:44:24 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Tue, 01 Nov 2016 10:44:24 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=HH+r3qEPToVNwiyV8JQm5X6b6Ag=; b=SlceJ13g/IRekXt42qtA QEfY0BPXimpQbo41BqMkichXYoZS+9AM4ciuaKtAgT6SQRwIkE1rP0P1qCIUMtT/ beORtvhsnKvx5PY4uxqp1EUwZt9FomUS6U4F0yehgYXD1g3Y6BVaRKCkJqWPyAal Q0LtH3XxiZtuxxJ0wkS6xjw= X-ME-Sender: X-Sasl-enc: m03wAdzdyKaE1h46cMx8D5Aio2YlnsR1eXxk/AoqBsM4 1478011464 Received: from kocolosk.cambridge.ibm.com (pok1.bluebird.ibm.com [129.42.208.177]) by mail.messagingengine.com (Postfix) with ESMTPA id 245CBF2D2C for ; Tue, 1 Nov 2016 10:44:24 -0400 (EDT) From: Adam Kocoloski Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: Modifying a cluster Date: Tue, 1 Nov 2016 10:44:23 -0400 References: <261F4DC48EA7304CA0ADF8F46BD0C6412BF4A5791F@PER-S-MAIL07.immersivetechnologies.com> To: user@couchdb.apache.org In-Reply-To: <261F4DC48EA7304CA0ADF8F46BD0C6412BF4A5791F@PER-S-MAIL07.immersivetechnologies.com> Message-Id: <89DB11EF-68FC-417A-B021-9D30A4B10BFB@apache.org> X-Mailer: Apple Mail (2.3251) archived-at: Tue, 01 Nov 2016 14:44:29 -0000 Hi Simon, that sounds more or less correct. I think you meant the = =E2=80=9C_dbs/=E2=80=9D endpoint instead of = =E2=80=9C_all_dbs=E2=80=9D. I=E2=80=99d agree that the process you outlined is a lot of manual = labor. This is part of the price that we pay for having the flexibility = to define a different sharding topology for each database in the = cluster. I might suggest a somewhat different approach - run a 3 node, n=3D3 = cluster, then put the nodes into =E2=80=9Cmaintenance mode=E2=80=9D one = at a time to patch and upgrade them. The maintenance mode flag will = allow the node to continue to participate in the cluster and receive = updates, but will prevent it from responding to the client until you = determine that it=E2=80=99s healthy again. Running n=3D3 ensures that = you will always have two live nodes durably committing data at any point = in time. I appreciate that this may be more expensive than the n=3D2 = model, but it=E2=80=99s far simpler operationally (as you won=E2=80=99t = have to modify the sharding setup at all) and is a configuration that is = much more extensively tested. If you want to use this technique the relevant configuration setting is [couchdb] maintenance_mode =3D true Cheers, Adam > On Nov 1, 2016, at 3:36 AM, Simon Keary = wrote: >=20 > Hi All, >=20 > I have a two node cluster with the following configuration: >=20 > q=3D8, r=3D1, w=3D2, n=3D2 >=20 > =46rom time to time I want to be able to be able to patch/upgrade the = servers by adding two new nodes (servers) to the cluster and then = removing the previous two. In this scenario I think all nodes in the = cluster at any time (2-4) should have copies of all shards of all = databases. My understanding is then to add a node I need to: >=20 > 1. Add the node to the list of cluster nodes via a PUT to /_nodes > 2. For each database update the /_all_dbs/ pseudo = document. For each shard in the document add the new node. >=20 > There are a few things I'm not clear of: >=20 > 1. Is this generally right? Assuming it is: > 2. With a large amount of databases it seems impractical to manually = add a node since a document for each database will need to be modified = and the modification isn't trivial. At the moment I have a JS script to = do this but wanted to check I'm not missing something? > 3. I don't really understand how the system databases (_users, = _metadata, _replication, _global_changes) fit into the picture? It looks = like I need to treat them as normal databases and add all the shards for = them to the new node? Doing a PUT to (for instance) = _all_dbs/_global_changes to do this fails with "Only reserved document = ids may start with underscore" so I'm a little confused... >=20 > Thanks for any help! > Simon >=20 > ________________________________ > Disclaimer: > This message contains confidential information and is intended only = for the individual(s) named. If you are not the named addressee you = should not disseminate, distribute or copy this email. Please = immediately delete it and all copies of it from your system, destroy any = hard copies of it, and notify the sender. Email transmission cannot be = guaranteed to be secure or error-free as information could be = intercepted, corrupted, lost, destroyed, arrive late or incomplete, or = contain viruses. To the maximum extent permitted by law, Immersive = Technologies Pty. Ltd. does not accept liability for any errors or = omissions in the contents of this message which arise as a result of = email transmission.