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 2018/01/31 19:28:40 UTC

[GitHub] wohali commented on issue #32: Add environment variables for cluster

wohali commented on issue #32: Add environment variables for cluster
URL: https://github.com/apache/couchdb-docker/pull/32#issuecomment-333183669
 
 
   Of the four values:
   - `q` only matters on database creation. It can be specified when doing so by adding `?q=1` to the document request.
   - we STRONGLY recommend you not adjust `n` for clustered CouchDB setups. In fact, our cluster setup wizard sets the following values:
     - n=1 for a 1-node setup
     - n=2 for a 2-node setup (strongly not recommended)
     - n=3 for 3+ node cluster sizes
   
     Because it sets these values as part of the setup wizard, it will be writing the value to the last ini file in the chain. This is why mounting the `/opt/couchdbetc/local.d` directory externally is strongly recommended.
   
     Finally it's worth pointing out that even if you don't set `n=1` for a single server setup, CouchDB figures out that only one node exists and creates n=1 databases in that scenario. So, again, no need to change the default here.
   
   - The `r` and `w` parameters are definitely no longer used by CouchDB itself. I read the source code myself today to confirm this. I will open an issue to update the documentation, which is out of date.
   
     Yes, specifying those values as query parameters is completely different to specifying them in the ini file, where they have special meaning. You simply cannot adjust the cluster-wide r/w value as it is always calculated to be an optimal value at all times. This allows you to `POST /{db}?q=1` if you want to create a `q=1` database. or provide them to a document or view read.
   
   The point I am trying to make is this: there are simply too many potential variables to be set in a clustered configuration to specify them all with environment variables. I don't see the point in special casing these variables since 99% of users will never want to change them.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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