[Search] Async search backing off strategy makes dashboards slow when searches take less than 1s to be served #157837
Labels
enhancement
New value added to drive a business result
Feature:Search Sessions
Feature:Search
Querying infrastructure in Kibana
impact:medium
Addressing this issue will have a medium level of impact on the quality/strength of our product.
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Describe the bug:
While debugging a slow dashboard I've realised that most of the waiting time was due to the async search backing off polling strategy.
Each ES search query time was within 1s, many around 500ms, but often the first request was served back from the server within 150ms: this triggered the first 1000ms delay for a new polling request, so the final Kibana reported time is can be even more than 2x the ES response timing.
In this example the final timing is the sum of the 2 requests + the 1s delay, taking more than 1.5s while ES reports less than 300ms to serve the full respose:
Maybe we could improve this aspect of the polling strategy?
One idea could be providing an additional step for the initial polling delay of 500ms for the first second?
On the other hand, discussing with @martijnvg offline, ES could take a little bit longer (from 100ms to ~200ms) to serve the first request in order to catch all "faster" searches and reduce the polling for these. Perhaps the two could be adopted together in some form?
cc @ppisljar @lukasolson
The text was updated successfully, but these errors were encountered: