A simple POC done for insert documents and doing load test in the process of migration from 2.7.7. Couchbase to 3.0.5 .for this POC Asynchronous program has been used.
The test follows with 10 instances of client and 1lk records.
3.0.5 inserting 69 records per seconds to insert. (using Whencompleteaysnc)
2.7.7. inserting 180 records per second to insert.(using sync)
Can you please suggest any refactoring can be done in the insert flow to improve scaling. Please find the sample below. 3.7.7 sample code:
@kamesh_kumar please share your 2.7 equivalent code - thanks!
Also, please try sync vs. sync as well. What does the resultHandler do? If you use an async callback, you are on our IO threads. You must not perform any blocking ops in them or you’ll get slowdown.
No .decoding was not there in 2x version. But need to print the response to the end user. In 2x different approach used.
Adding to the above logic there is a validation check before insert doc which was added newly .Validating the bucket exist or not before insertion . I am using two async calls in this process. one for bucket validation ,another for insertion.
With Sync both version are giving good results. Resulthandler are used to send back the response to end user. I will try to delete that piece of code and give a test.