You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/01/07 18:40:51 UTC

[GitHub] [couchdb] kocolosk commented on issue #2386: CouchDB Zones: How to verify if zones are setup correctly?

kocolosk commented on issue #2386: CouchDB Zones: How to verify if zones are setup correctly?
URL: https://github.com/apache/couchdb/issues/2386#issuecomment-571716339
 
 
   Hi @nicknaychov, are you talking about the `placement` option described here?
   
   https://docs.couchdb.org/en/stable/cluster/sharding.html#specifying-database-placement
   
   That setting controls which nodes host replicas of database shards. CouchDB has some internal optimizations to preferentially retrieve DB metadata from nodes in the same zone as the node handling the incoming HTTP request, but general R/W traffic will cross zones and communicate with every replica of a database shard as needed. Typically the placement setting is used to ensure replicas are distributed to different fault domains, e.g. different availability zones in a cloud region.
   
   If you want to confirm that the placement you configured took effect for a particular database you can query the `_shards` endpoint:
   
   https://docs.couchdb.org/en/stable/api/database/shard.html
   
   Even in the case where you configured the placement so that the shards for database A are hosted on one set of nodes and the shards for database B are hosted on another set, the cluster will still cross zones as needed to satisfy R/W requests. For example, you could submit a request to one of the nodes hosting A asking to read a document for B and that request will succeed -- it will just issue the internal RPCs to retrieve the document data from the nodes in the other zone.
   
   Hopefully that makes sense. Also dropping the `rfc` label as that's intended for formal proposals to enhance CouchDB. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services