Question regarding ‘Optimistic Replication’ introduced with v2.1 and Disaster recovery

Hello,

We are not sure to understand ‘Optimistic Replication’ introduced with v2.1 and the optimal level we should set xdcrOptimisticReplicationThreshold when XDCR is used for disaster recovery only.

What we understand when XDCR is used for Disaster recovery only, is that there should be no conflicts resolution to loose on the destination, because destination is not accessed and updated by any app or any couchbase operation except XDCR.

Could you please confirm that when no create or update (set, incr, etc) are done on the XDCR destination cluster, xdcrOptimisticReplicationThreshold should be set really high (at a level matching the size of the biggest item in the bucket ), so that metadata are never read on the source cluster before putting the item in the replication queue ?

Regards,

Xavier

1 Answer

« Back to question.
With optimistic replication turned 'OFF' or set to (20MB). All documents from the source cluster will be sent to target cluster with KEY , META and VALUE. Then conflict resolution will still work on the target cluster before SET().
Only difference is that with Optimistic Replication turned 'ON' and set to (256B) the source cluster will send to the target cluster KEY and META only of docs VALUE size of > 256B. Then if the Target says I want that doc to the source cluster the source cluster will send the KEY, META and VALUE. Then target cluster will do conflict resolution before SET(). The Idea is that document who's value is less then 256B is so small you might as well sent the full doc on the first trip to the target cluster.

NOTE that this setting is cluster wide and effects all buckets.