elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.48k stars 8.04k forks source link

[data.search] Stop sending entire request body in polling requests #186138

Open lukasolson opened 3 weeks ago

lukasolson commented 3 weeks ago

Summary:

Currently, when using the data.search services, we are sending the entire search request body to every polling request. This takes up a lot of data transfer and is unnecessary, since all we're using is the search request ID to poll on the ES _async_status endpoint.

We should check and make sure that other search strategies aren't negatively affected if we switch over to just sending the request ID, and we should also make sure that things like "other bucket" scenarios still work.

Consider, for example, these requests:

image

This shows three distinct async search requests. The final responses are indicated by the larger response_length. It is totally unnecessary to be sending such a large request body (indicated by request_length) in each of the polls leading up to the final response.

elasticmachine commented 3 weeks ago

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)