Lower latency by using more shards (with routing)

Hey,

I'm trying to lower the search latency for an index which has routing enabled (and we consistently use it for all queries) and I was wondering if increasing the amount of shards would do the trick? We're deployed on Elastic Cloud in 3 zones.

My reasoning for this: with routing we already go to 1 shard so there's no overhead (when searching) if the amount of shards increases. On the other hand, each shard would be smaller, which (in my mind but please correct me if I'm wrong) means ES has to go through less data, thus making the search faster.

Any experts that can confirm or deny this suspicion?

Thanks!

If you are consistently using routing for queries, latency can be reduced by increasing the number of primary shards as you described, at least as long as you have a reasonably large number of routing keys and a fairly even distribution of data across these so shards end up evenly sized wthout hotspots. It may however slow down queries hitting more than a single shard.

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