We are having the following setup and I would like to understand a little bit how all of this could interact together…
In order to have availability of our indexes, we are duplicating them across different nodes… The only difference between duplicates is that we are adding the ip of the node at the end of the index name.
We are seeing that creating the plan for a query seems to take longer and longer and be based on the number of indexes on the bucket we are targeting for the query - is this expected, is there ways of improving this? Using USE INDEX in the query is not an option as this mean the client will have to know about the cluster and were the index reside…
Most of the time, we are using prepared statement, so my guess is that we pay only once the cost of creating the plan… But I am wondering how this behave with duplicates indexes for HA? Does the prepared statement plan refer to a specific index? If this is the case, what will happen if the node having this index disappear? Will the Java SDK recreate the plan against one of the remaining index that can fulfil the query? So basically by using prepared statement, we are gaining on the execution plan creation time, but we are losing the load balancing of the use of the indexes between nodes?
Can someone explain how all of this interact and what is the recommended way to use multiple duplicate indexes for HA?