I am using couchbase 3 with node.js.
I have a query that needs immediate consistency from a view (index). I currently use a regular view with option: stale=false (before).
This makes the query slower but still reasonable most of the time. The problem is that during couchbase cluster re-balance (add or remove a cluster node) the query can take over a minute to return and this is unacceptable for the application.
The question is - what is the best way to fix or to work around this problem?
I read about GSI in couchbase 4 and thought about using it with a manual full replicas on all couchbase nodes; once a couchbase node fails I will add a new node and create the GSI replica on that node as well. I can also use the timestamp consistency to get faster results (vs stale=false when using a view). The question is how will the query behave during the build of the GSI on the new node - will it know not to query that same node because the index is still during a build and is yet far from consistency??
What would be the best approach?