How does index update actually work and how expensive is it?
What would the performance (load and request time) be like if I want to achieve immediate consistency on view results and indices?
Hello,
In addition to the post pointed by HouseHippo I invite you to read this part of the documentation:
- Index Updates and Stale Parameter that allows the developer to “control” the indexing. (remember that document will be indexed once they are saved on disk)
- Automated Index Updates
So once the indexing process starts it launch the V8 engine, and the server sends the document to index to the views.
Regards
Tug
@tgrall
I guess I should have been more specific. How does the indexer work in multi-node situation? Are indices stored on every node or partitioned? How would failing nodes affect indexing?
You might benefit from watching the recorded webinars Couchbase 101 (Architecture) and Couchbase 104 (Views/Indexing) at www.couchbase.com/webinars. Yes, each node has a set of partitions of data (active) and they maintain the indexes for the active partitions on each node. For failsafe, you can also index replica partitions as well so that when you failover a failing node you promote the replicas and their indices. One thing to be aware of is that if you have replicas and you have indexing on replicas you will need to size your cluster accordingly.