Underlying protocol used in Couchbase Java SDK 2.x.x and onwards

Hello Couchbase experts ,
I am new to Couchbase and I am planning to consider Couchbase for one of our reporting modules which has a huge volume select queries and many concurrently running such calls. Also we will not be performing any updates to the documents its a READONLY Bucket.
We are currently considering below two approaches
1. Using Rest API service that will fetch data from Couchbase using SpringData.
2. Using Couchbase Java SDK directly firing N1QL queries. (version 2.7 +)
Please suggest what is the best approach out of these two, provided the documents fetched on an avg will be 25K per call.

I would also like to know what is the underlying protocol Couchbase Java SDK uses to connect to Couchbase whether its Rest API with Http Protocol or socket based port to port connectivity?

Thanks in advance.
vbada

Hi @vbada
I’d recommend using the SDK over the raw REST API. It will do some simple load balancing for you, provide a nicer interface, and (in 3.x+) provide automatic backpressure - e.g. your app just needs to read rows and if it can’t keep up with the incoming data, the SDK will automatically stop pulling data off the network buffer for a while.
Under the hood, the SDK uses a binary protocol to communicate with the Key-Value service, and HTTP for the other services (including N1QL).

1 Like

Thank you @graham.pople . That was really helpful…

1 Like