Query preference leads to unbalanced shard selection

We have a cluster made of 3 data nodes. Our indexes are configured with 3 shards and 1 replica. For whatever reason, shard allocation on nodes is currently as follows:

node1     node2    node3
R0 R2     P0 P1    P1 R2

As you can see, Node1 is assigned only replica shards.

When sending queries to ES, Kibana sets the preference to a fixed value determined at the time Kibana is first loaded in the browser. Unfortunately, in our case the set preference directs the request to shards allocated on Node2 and Node3 only - nothing on Node1. Result is Node2 (for instance) is overloaded with twice the work assigned to Node3.

Is there a way to tell ES to take into account the node hosting each shard and try to balance the load between them ?

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