couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zdravko Gligic <>
Subject Re: Peer-to-Peer Replication
Date Wed, 06 Apr 2011 18:50:07 GMT
>> (1) How would two CouchDB go about discovering and meeting each other?
>>  Would this not require a central server (similar to IRC) and are
>> there any hosted solutions?
> Two instances don't discover -- they depend on *you* telling them to
> replicate.

I realize that keeping track of "who is currently online" is something
that one needs to develop as part of one's application and was in fact
curious if there were already built solutions for this, either as
software or even as hosted services ?

> POST /_replicate HTTP/1.1
> {"source":"","target":"database"}
> Once you've triggered a replication, CouchDB takes over and figures out
> the differences between the DB revisions on both instances.
> Once it is done, it is done -- unless you pass continuous: true. That
> sets up continuous replication, where the target will watch the source's
> _changes API and replicate new docs over as needed.

However, for a bunch of peers, it seems that there would need to be a
form of a ripple effect, where two peers then go on to discover other
peers with more up to date CouchDB instances.

> For more, see It's a
> great guide.

That contains an excellent explanation of what happens between two
peers. However, it seems that any serverless p2p application would
require lots of sophistication just to determine who needs to connect
to who, in order for everyone to get updated in most or even
relatively efficient manner.

>> (2) Once at least two CouchDB's discover and meet each other, is it
>> just their URLs (domain name or IP based) that are needed? What about
>> routers and/or firewalls?
> Yep. As long as the instances can reach each other, everything should
> just work (TM).

How would 2 CouchDBs communicate to each other if both are in
different homes, where each one is behind a router with multiple
computers as CouchDB peers?

> If you want to look at some other offerings, BigCouch
> ( is one that I quite like. But IMO
> you should get comfortable with what CouchDB provides before you go
> elsewhere.

In terms of this p2p replication, what specifically does BigCouch
offer that is beyond regular CouchDB?

Thanks again.

View raw message