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

[APM] Cancel requests (both server-side and browser-side) #81740

Closed
dgieselaar opened this issue Oct 27, 2020 · 3 comments · Fixed by #89557
Closed

[APM] Cancel requests (both server-side and browser-side) #81740

dgieselaar opened this issue Oct 27, 2020 · 3 comments · Fixed by #89557
Assignees
Labels
apm:performance APM UI - Performance Work Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v7.12.0

Comments

@dgieselaar
Copy link
Member

We've seen examples of a cluster becoming overwhelmed, or at least search tasks getting queued, when a search is slow and the user starts clicking around in the UI. One possible cause is that we don't cancel running searches, and ES starts queuing them up, resulting in an unresponsive UI (at least in terms of data).

ES will cancel a search when a connection closes. We can leverage this mechanism if we cancel requests browser side, and close the connection to ES when the browser request is closed.

We can look at the search strategy service for an example of how to do this.

@dgieselaar dgieselaar added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Oct 27, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@sorenlouv
Copy link
Member

@dgieselaar wouldn't this be handled for us if we used the kibana search service?

@sorenlouv sorenlouv added [zube]: Inbox technical debt Improvement of the software architecture and operational architecture and removed technical debt Improvement of the software architecture and operational architecture labels Oct 28, 2020
@sorenlouv sorenlouv changed the title [APM] Cancel requests (both client-side and browser-side) [APM] Cancel requests (both server-side and browser-side) Oct 28, 2020
@dgieselaar
Copy link
Member Author

Canceling the request server-side will be handled by #86594. Canceling the request browser-side, e.g. when a component unmounts or when a new request starts is a little more complicated: useFetcher know when a component mounts/unmounts, but does not know anything about callApmApi. It's fixable but maybe some more work, I suggest we do that separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:performance APM UI - Performance Work Team:APM - DEPRECATED Use Team:obs-ux-infra_services. v7.12.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants