How does elasticsearch route reads?

I have an index in which I am using auto expand replicas to 0-all. This means every node has every replica

So when a search request comes to ES, will it be processed by only one node? I am using 7.2 and the search request is specifically a percolator query. ES doc just says the requests are round-robin'd across the replicas. But given such a setup, it would benefit from executing on just one node right?

The index is mostly read-only

Elasticsearch will only search one copy of each shard, but if it is to search multiple shards then it will not necessarily choose copies that are all on the same node. This means the search can benefit from the resources of the whole cluster (CPU, IO bandwidth, filesystem cache etc).

Put differently, if you are searching a single index with number_of_shards: 1 then there will be at most two nodes involved: the coordinating node and one of the data nodes holding a copy of that shard. These might or might not be the same node.

The search profile API and its UI are a good way to see the details of how a search was executed, including the nodes that were involved.

oh alright, i'm sure you guys thought about the benefits. I asked because I went thru this post
https://www.elastic.co/blog/percolator

if you see the last section of it, it mentioned the benefit of auto_expand_replicas
@DavidTurner

That blog post is pretty old and I don't think it reflects how things work today. See the reference manual for more up-to-date information.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.