Submit query to different node in cluster in timeout scenario

Couchbase cluster is having 3 nodes.
We are using java sdk and connecting to couchbase cluster with VIP url. Some times we get timeout exception on specific couch base nodes . I am planning to go with re-try mechanism if there is timeout on the query, but the re-try should go to different node on the cluster.
Example :
node1, node2 , node 3 in cluster1
App sent request to node1 and got the timeout. Now when application is retrying we need to send request to node2 and should not sent to node 1.
Note : I would like to execute N1QL query.
Is this possible ?

@vsr1 and @daschl : could you provide your inputs on this.

Hi @ck
This is not possible with the Java SDK, but you could use the REST API to achieve it.

Thank you @graham.pople for your reply. Could you please refer to any documentation on how can we do it using REST API, that will be really helpful.

Sure, the docs for the REST API are here


Thank you @graham.pople