Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add metrics to track latency issue due to search idle feature #12678

Closed
ruai0511 opened this issue Mar 14, 2024 · 1 comment · Fixed by #12768
Closed

[Feature Request] Add metrics to track latency issue due to search idle feature #12678

ruai0511 opened this issue Mar 14, 2024 · 1 comment · Fixed by #12768
Labels
enhancement Enhancement or improvement to existing feature or request Search Search query, autocomplete ...etc

Comments

@ruai0511
Copy link
Contributor

ruai0511 commented Mar 14, 2024

Is your feature request related to a problem? Please describe

Shards refresh automatically in the background by default very second. When no search request lands on a shard for over 30 seconds, the shard will go into an idle state where it stops the implicit index refresh to improve performance. (more information on Search Idle here).

However, this causes another problem. After a shard goes idle, there are still write requests coming in (write requests doesn’t affect the search idle feature), so the next search request will need to force a refresh on the shard to get the most updated data - to make sure all the write requests we got during idle are reflected - and then serve the result. However, the additional step here to force a refresh consumes time and increases latency.

We'd like to observe how often an idle shard is being "woken up".

Describe the solution you'd like

As a first step to improve the performance due to this force refresh, we'd like to add metrics to track this issue. That is, to add a counter to reflect when a search request wakes up a shard, and then export it through an API for visibility. This counter makes sure we know the timestamp of a "blocking index refresh" happening, so that we can observe the relationship between a shard wakes up and high latency. The metrics tracker will be the first step of solving the issue Here.

Related component

Search

@ruai0511 ruai0511 added enhancement Enhancement or improvement to existing feature or request untriaged labels Mar 14, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Mar 14, 2024
@andrross
Copy link
Member

[Triage - attendees 1 2 3 4 5 6]
@ruai0511 Thanks for filing, looking forward to seeing progress here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Search Search query, autocomplete ...etc
Projects
Status: Done
2 participants