couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <>
Subject Re: Bidirectional replication and new documents
Date Tue, 26 Oct 2010 19:31:45 GMT
On Tue, Oct 26, 2010 at 11:52, Dave Cottlehuber <> wrote:
> On 27 October 2010 03:50, Antoine Kurukchi <> wrote:
>> Hi All,
>> Been reading a lot about couchdb and am really impressed by it. Great
>> work. I have got a few questions about replication and new documents.
> Welcome aboard the couch, Antoine.
>> A lot is mentioned about continuous replication and bidirectional
>> replication but is it possible to have both features working at the
>> same time? If it is possible, what happens if there is a disconnection
>> between the two database servers and are there any pit falls with this
>> approach?

Bi-directional replication isn't really a "thing" in CouchDB. There's
been mention recently of adding API sugar to make it easy, but it's
just two replications. Whether they are continuous or not is

> I've had continuous replication running for some time on a small 3-way
> replicated couch without any issues, in a multi-master mesh (mmm). I
> believe there may be a timeout - can anybody confirm?

For pull replication, there is no timeout on the source. The source
will stream changes to the target with empty lines every ten seconds
as a heartbeat. If the target misses 3 of these it will give up. So
you have 30 seconds of disconnection before a continuous pull will
fail. The command to start continuous replication is idempotent,
though, so it's easy to set up a job that ensures it's always running
by triggering it every minute or so. In the next release there should
be a way to tell CouchDB about persistent replication jobs that should
always be running.

For push replication there is no longpoll on the database changes.
Instead, you'll only see a failure if one of the individual requests
totally fails (10 times, with exponential backoff, I think it comes
out to around 10-15 minutes of disconnection before it'll die).

Looks like Dave answered the rest of your questions. Welcome aboard.

View raw message