You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Jason Gordon <ja...@assurebridge.com> on 2016/04/28 16:04:21 UTC

CouchDB 2.0 and zones

Hi,

Does CouchDB 2.0 support BigCouch-style zones?  If not, is it in the
roadmap?  I would like to have a cluster where two nodes are in one data
center and a third node (for hot failover) is in a remote data center.  I
know replication could be used  but a cluster with zones seems more elegant.

Thanks,

Jason

Re: CouchDB 2.0 and zones

Posted by Adam Kocoloski <ko...@apache.org>.
Yes, it does. The API has changed a bit, though. You need to label each of the nodes in the /nodes database with a “zone” attribute and then define a config setting like

[cluster]
placement = metro-dc-a:2,metro-dc-b:1

which will ensure that two replicas for a shard will be hosted on nodes with the zone attribute set to “metro-dc-a” and one replica will be hosted on a node with the zone attribute set to “metro-dc-b”.

Note that you can also use this system to ensure certain nodes in the cluster do not host _any_ replicas for newly created databases, by giving them a zone attribute that does not appear in the [cluster] placement string. This is definitely an area where we need to beef up the documentation. Cheers,

Adam

> On Apr 28, 2016, at 10:04 AM, Jason Gordon <ja...@assurebridge.com> wrote:
> 
> Hi,
> 
> Does CouchDB 2.0 support BigCouch-style zones?  If not, is it in the
> roadmap?  I would like to have a cluster where two nodes are in one data
> center and a third node (for hot failover) is in a remote data center.  I
> know replication could be used  but a cluster with zones seems more elegant.
> 
> Thanks,
> 
> Jason