You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "Al Z." <az...@gmail.com> on 2022/03/27 11:45:53 UTC

CouchDB High Availablility deployment and ChangeFeed

Hello.

I have a single node running couchDB 3 deployed live.
I have a DB-per-user setup with about 2k databases on a single node.
A single Spring-boot API talks to couchDB vis HAProxy ...

1) I would like to have multiple 2 to 3 nodes in the same DC so that in
case one node goes down, the system is still operational.
Each node will have an instance of the Spring-boot API, ...
I am not sure whether I should be looking into clustering or replication.
I do understand that with replication, the nodes can be in different DB.
At this point, the plan is a single DC only. In the future, I may look into
a cross DC setup.

Any hint will me most appreciated.


2) I use the couchDB change feed to update some internal systems and send
notification emails.
Each change feed needs to be processed exactly once.
The change feed seems to be a major point of failure for my setup ...( I
also noticed that if couchDB is restarted, I need to restart the
spring-boot app, otherwise, it does not process the feed).
Given that I am planning to move to a multiple nodes setup, I am not very
sure how I would be able to process each feed only once without having to
manually handle duplicate.
Any experience or hint or alternative would be most appreciated.

Thank you very much.

Best regards.

A.

Re: CouchDB High Availablility deployment and ChangeFeed

Posted by Jan Lehnardt <ja...@apache.org>.
Hi A,

for your setup, we recommend using CouchDB Clustering to achieve high availability.

But note that neither a single node nor a cluster _changes feed guarantees exactly-once-delivery. You have to solve that in your Spring-boot API.

Best
Jan
—
Professional Support for Apache CouchDB:
https://neighbourhood.ie/couchdb-support/

*24/7 Observation for your CouchDB Instances:
https://opservatory.app

> On 27. Mar 2022, at 13:45, Al Z. <az...@gmail.com> wrote:
> 
> Hello.
> 
> I have a single node running couchDB 3 deployed live.
> I have a DB-per-user setup with about 2k databases on a single node.
> A single Spring-boot API talks to couchDB vis HAProxy ...
> 
> 1) I would like to have multiple 2 to 3 nodes in the same DC so that in
> case one node goes down, the system is still operational.
> Each node will have an instance of the Spring-boot API, ...
> I am not sure whether I should be looking into clustering or replication.
> I do understand that with replication, the nodes can be in different DB.
> At this point, the plan is a single DC only. In the future, I may look into
> a cross DC setup.
> 
> Any hint will me most appreciated.
> 
> 
> 2) I use the couchDB change feed to update some internal systems and send
> notification emails.
> Each change feed needs to be processed exactly once.
> The change feed seems to be a major point of failure for my setup ...( I
> also noticed that if couchDB is restarted, I need to restart the
> spring-boot app, otherwise, it does not process the feed).
> Given that I am planning to move to a multiple nodes setup, I am not very
> sure how I would be able to process each feed only once without having to
> manually handle duplicate.
> Any experience or hint or alternative would be most appreciated.
> 
> Thank you very much.
> 
> Best regards.
> 
> A.