nickva commented on issue #2382: CouchDB backup instance - zones vs replicas? URL: https://github.com/apache/couchdb/issues/2382#issuecomment-569391582 @nicknaychov I'll try to answer some of the questions you had > When we should use zones and when replicas? A placement setting using zones will override replicas. So setting a default placement or providing it in the db creation HTTP API request will use that setting over what `n` values holds. So specifying `.../?&placement=zone_a:2,zone_b:2&n=3` would create 4 copies instead of 3. One thing to watch out for here is that `zone_a` and `zone_b` have at least two nodes each. > Can we and how to add zones later to existing setup? You'd decide what the zone configuration looks like, then edit the `_nodes` metadata db to add zone labels to each node, then edit the `_dbs` and update the shard map. This would be the re-balance part you mentioned. You could follow some of the instructions from shard moving doc section: https://docs.couchdb.org/en/stable/cluster/sharding.html#moving-a-shard This would have to be done right and in the correct order or all of the sudden you data won't be "found" by the incoming requests. It's much easier if the dbs are created with the new setting already... > What is the best/optimal way to setup remote "hot" site backup of existing cluster? In general I mostly have seen simple replications there :-) but using zones you'd do the outline above and then maybe follow this archived blog https://web.archive.org/web/20160429122538/https://cloudant.com/blog/choosing-zone-configurations-for-bigcouch which discusses the issue pretty well I thought. The top recommendation there I think is to run 3 zones: 2 primary ones with 2 nodes each, and 1 backup node in its own zone. > Optimal settings for cluster deployed at different remote sites? The danger there is running Erlang clustering over WAN. By default it is tuned to run over LAN type networks. Might need to do more research there but I know of at least one parameter `+zdbbl <KB>` that changes the Erlang distribution (clustering) buffer size. It might be good to have a larger value. http://erlang.org/doc/man/erl.html#+zdbbl that change would go into the `vm.args` file.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
