Is it necessary?  Why, i don't understand. 

Ajay Pawaskar <[email protected]>编写:

>Thx jens,
>       I am going with keeping one couch DB server for write operation and at 
> the same time replicating updated documents for read on other server
>
>-----Original Message-----
>From: Jens Alfke [mailto:[email protected]] 
>Sent: Wednesday, May 23, 2012 2:42 AM
>To: [email protected]
>Subject: Re: Replication Configuration
>
>
>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

Reply via email to