This answer is valid only for SDK versions >= 2.70, right?
Answer here Java SDK can not access Query node in couchbase 5.0 recommends to not include query nodes in bootstrap list.
Also should Index nodes be included, or only kv nodes are compulsary ?
This answer is valid only for SDK versions >= 2.70, right?
You’re right, I gave some bad advice in this case. Including non-KV nodes in the bootstrap list can cause problems for Java SDK versions prior to 2.7.5/2.7.6 [release notes].
Also should Index nodes be included, or only kv nodes are compulsary ?
Only KV nodes support the most efficient way of fetching cluster configuration. With SDK 2.7.5 and later you can bootstrap against any type of node, and the SDK will automatically switch to getting cluster configuration from a KV node if one is available. (In prior SDK versions, if you bootstrap against a non-KV node the client will stick with that node and continue to use the inefficient config fetching strategy, which can lead to other issues.)
If you’re using a Java SDK prior to 2.7.5, or if you want to bootstrap in the most efficient way, then include only KV nodes.
If you’re using SDK 2.7.5 or later and you want to be able to connect to the cluster even if all of the KV nodes are offline, it’s safe to include all nodes (of any kind).