couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Replication Configuration
Date Wed, 23 May 2012 06:42:12 GMT

On May 22, 2012, at 3:45 PM, Ajay Pawaskar wrote:

                 Can I start Replication on Both Servers

                                               AC è BC

                                               BC è AC ?

Sure, bidirectional replication is very common.

               If yes then what will be probability of overwriting Data of AC by BC or vice
a versa (as load balancer is in between I don't know which server is going to update[I am
updating couch from .net app])

CouchDB will never overwrite data. What can happen is a conflict, if the same document is
updated differently on both servers and then replicated across. Your app will need to detect
the conflict, resolve it by comparing both conflicting revisions, and write the resolved document
back to the database.

It's also possible to structure your system to avoid conflicts, for example by routing all
write requests so that any individual document will only ever be updated on one server. You
can do this pretty easily by taking a hash of the document ID, modulo the number of servers,
and sending the request to the server with that index.

—Jens

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message