You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running kibana dashboards and kibana uses _msearch to bundle all the queries of a dashboard in one request. I have 3 nodes and my dataset is one index with 1 primary shard and 2 replicas.
I would expect elasticsearch to distribute every query across the nodes but it does to load balance the queries. If I run all the queries separately using _search on the command line they are distributed across all nodes as expected and return much faster because it uses all the nodes instead of a single one.
I do not know if this is an expected behavior or a bug, but I believe that would be much better if elasticsearch would be able to multiplex queries submitted with _msearch across all the nodes to exploit the parallelism.
The text was updated successfully, but these errors were encountered:
This is certainly due to the fact that Kibana adds a preference to the _msearch request that is sent to es. This preference is set to the session id of the Kibana user and ensures that all search inside a dashboard use the same shards/replicas: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html
Without preference, _msearch just send each individual query independently so they could all potentially hit a different replica.
@jimczi Thank you very much for the explanation. I was not aware of preferences. I was pretty confused about the fact that _msearch would not distribute queries, it seems very backward.
I will raise this issue on at the kibana repository.
I am running kibana dashboards and kibana uses
_msearch
to bundle all the queries of a dashboard in one request. I have 3 nodes and my dataset is one index with 1 primary shard and 2 replicas.I would expect elasticsearch to distribute every query across the nodes but it does to load balance the queries. If I run all the queries separately using
_search
on the command line they are distributed across all nodes as expected and return much faster because it uses all the nodes instead of a single one.I do not know if this is an expected behavior or a bug, but I believe that would be much better if elasticsearch would be able to multiplex queries submitted with
_msearch
across all the nodes to exploit the parallelism.The text was updated successfully, but these errors were encountered: