Jump to content

Recommended Posts

Posted (edited)
On 11/11/2024 at 1:51 PM, teknogk said:

Does anyone have an updated install plan for creating the multizone cluster on couchdb 2/3? Im having trouble understanding the placement and zoning options for couch, but would like to be running on a newer version when building a 4.3 cluster. Also can you post the discord invite again, it expired. id love to be able to help in anyway that i can.

Don't want to get too off topic with this thread, but:

Couch v2 is the supported/approved version, but I use v3. You need to modify a Trunkstore view (if you use Trunkstore) and do a redirection of the admin port using HAProxy or other server like Nginx/Caddy/whatever.

There is a thread about the Trunkstore view mod here in the forums.

Placement and zoning depends on your cluster size. If you are in a single DC, then there isn't a reason to do multi-zone, unless you have a large number of servers. The most common scenario I encounter when setting up clients is they have 2 zones, and I recommend a minimum of 3 DB servers in each if they want full redundancy with good performance. Then for placement I usually recommend a 2+2 split; in other words put 2 copies of each document in the local zone, and 2 copies in the remote zone. 

NOTE that CouchDB zones are disconnected from and have no relationship to Kazoo zones---it's a totally different system. You could have a single zone Kazoo, with 5 Couch zones if you wanted, or vice versa. 

I generally recommend to have as few zones as you can get by with, both for Couch and for Kazoo. 

(I sent you an invite as well)

 

 

Edited by RuhNet (see edit history)
  • Replies 129
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 3 weeks later...
Posted

Hi RuhNet/Mooseable,

Our BigCouch cluster is old and dying and we're looking to move to CouchDB (preferably v3).  Is it possible to provide any information as to what's needed to be done with HAProxy to redirect the admin port (5986) to 5984?  It's not just simple forwarding but rewriting the URL's, correct?

Posted
10 hours ago, Mark McDonald said:

Hi RuhNet/Mooseable,

Our BigCouch cluster is old and dying and we're looking to move to CouchDB (preferably v3).  Is it possible to provide any information as to what's needed to be done with HAProxy to redirect the admin port (5986) to 5984?  It's not just simple forwarding but rewriting the URL's, correct?

Sure---and you are correct, it needs a redirect since the path has changed. All you need is something like this:

frontend couch-5986-admin-port
    bind 127.0.0.1:15986
    default_backend couch-redir-node-admin-port

backend couch-redir-node-admin-port
  balance roundrobin
    reqrep ^([^\ :]*)\ /(.*)     \1\ /_node/_local/\2
    #http-request replace-uri ^/(.*)     /_node/_local/\1
    server couch1 172.31.12.34:5984 check
    server couch2 172.31.23.45:5984 check
    server couch3 172.31.34.56:5984 check

If you are using a version of HAProxy v2.0 or later then comment out the `reqrep` line and uncomment the `http-request replace-uri` line.

Posted (edited)

Awesome, thank you!  We've been migrating databases for the past 24 hours.  For whatever reason the connection from BigCouch times out and we have to re-run the _replicate on it numerous times to finally get all the documents over.  Have you seen anything like this?

After running the same command a few (or a few dozen) times, everything eventually makes it over.  We tried everything from connection timeout, waiting between replicates, etc with the same result. 
 

-H "Content-Type: application/json" \
-d '{
"source": "http://xx.xx.xx.xx:5984/anonymous_cdrs",
"target": "http://user:pass@xx.xx.xx.xx:5984/anonymous_cdrs",
"create_target": true,
"connection_timeout": 1000000
}'
{"error":"error","reason":"{http_request_failed,\"POST\",\n \"http://xx.xx.xx.xx:5984/anonymous_cdrs/_bulk_get?latest=true&revs=true&attachments=false\",\n {error,sel_conn_closed}}"}
Edited by Mark McDonald (see edit history)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...