-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Investigate support for async search #69095
Comments
Pinging @elastic/apm-ui (Team:apm) |
Some qs:
|
This wouldn't be fetched with async search, if that's what you mean?
Really good point. That could make things a more tricky - we would have to keep track of multiple long running queries per API endpoint.
If a query takes 20s to return the entire response, the user currently has to wait for the full 20s before seeing anything. With async search we can poll for the state of the query and get partial results as they become available, eg. every second. LMK if that makes sense |
Right, I see async search only requires an ID so that should be fine.
Yeah - I'm having a hard time seeing how we can reasonably do this (without having something like materialized views).
👍🏻 I guess this could work if we compose our queries w/ observables and stream data into it, and use something like server-sent events or websockets to push new data to the browser. I don't really see an easy way to do this though, do you? |
Good old long polling also works, doesn't it? |
SSE will work AFAIK. Long polling too. But the bigger change would be observables. We could make a |
Observables make a lot of sense if we use SSE or WS. Not so much for long polling since this is initiated from the client.
yes, I think for APM partial data is the main value proposition of async search. |
How do you see this working without something like Observables? I'm not sure what the difference would be server-side whether we use SSE/WS or long polling (other than the protocal), can you clarify? |
With long polling the server will be stateless and each request from the client will contain the es request key. With web sockets or SSE the server would be stateful and periodically read the progress of the ES request and send the events to the client as they are available. In the latter case I think observables make a lot of sense. In the former not so much. |
@sqren ah yeah, I mistook long polling for streaming responses. I have a hard time seeing if the request id approach will work out, but I'll gladly be proven wrong 😃 |
Why wouldn't it work? afaict from the docs that is the recommended way to retrieve a running search instance. |
Async search is a new capability in elasticsearch that improves long/slow running queries.
It is not uncommon for APM users to have very large datasets that causes the ui to be unresponsive for several seconds or even timeout completely. This is a really bad user experience and async search might be able to remedy this.
Requirements for adding async search:
/_async_search
instead of/search
useFetcher
needs to have a new propertyisPartial
to indicate in the UI whether the currently displayed content is fully loaded or partially loaded.Investigate: We might be able to get the first two items on the list for free if we migrate to Kibana Search Service.
The text was updated successfully, but these errors were encountered: