I’m working with Couchbase (Java SDK) more than one year and from the beginning I was very worried about one question: why set documents with Replicate.ONE SO slow? I have reached only ~10-15 sets per second. I worked with two nodes of Couchbase and on very good application servers, so such perfomance is not hardware problem.
I noticed, that with Persist.ONE perfomance equals to perfomance with Replicate.ONE. I suggest, that response on set operation with Replicate.ONE from server returns only when document writes to disk. I want to verify my suggestion or see how such mechanism implements by see sources of Couchbase Server. Looking on github, I can’t find implementation of this functionality, so I ask for help from developers to show me module, that implements this.
first, make sure you use both a recent server and client version, if you go with the latest ones they both should have decent performance in that area.
Replication takes some time, although it should never be in the upper second range as you reported. Can you give us more information about your setup, workload and intended behavior? Also, feel free to raise a JCBC ticket and we can take it from there.
We have lots of users using this feature in production and are happy with the performance it provides.
count of sets per second equals several tens of thousands.
Maybe when you tell about good perfomance you mean perfomance of async operations?
Unfortunately I need to use sync operations because I can’t lose any changes of document in case, when one server of cluster fails. Async operations return positive response when I document doesn’t replicate to another cluster. I test it by following part of code: