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

[data.plugin] Use CBOR instead of JSON as transfer format #199392

Open
thomasneirynck opened this issue Nov 7, 2024 · 3 comments
Open

[data.plugin] Use CBOR instead of JSON as transfer format #199392

thomasneirynck opened this issue Nov 7, 2024 · 3 comments
Labels
impact:low Addressing this issue will have a low 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.

Comments

@thomasneirynck
Copy link
Contributor

thomasneirynck commented Nov 7, 2024

Describe the feature:

Use cbor instead of JSON as transfer format of the data-plugin (e.g. ese and esql search-strategies)

Describe a specific use case for the feature:

Earlier investigation has shown that using cbor provides a marginal benefit over using JSON (5% size reduction, faster decoding on client).

Changing the transfer format is now possible due to #193060. In that PR, data-service now uses metadata about async-searches from the http-headers rather than decoding it from the body. It would allow leaving the cbor returned from ES intact and only decode it on client.

Overall, this would be a small performance benefit in isolation for a single search. It would have broad overall impact on all applications using the data-plugin (Discover, Dashboard) since that benefit would apply to all searches issued by those apps (DSL/ES|QL in Lens and Discover).

@thomasneirynck thomasneirynck added the Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. label Nov 7, 2024
@elasticmachine
Copy link
Contributor

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

@kertal
Copy link
Member

kertal commented Nov 11, 2024

One question, would't CBOR instead of JSON introduce another barrier in debugging problems? Since CBOR is encoded, I guess it's harder do debug when we get HAR reporting proplems. We then would need decoders to have a look at the responses raw data? Does a marginal benefit in terms of speed and performance a higher cost in maintenance of dev & support side?

@kertal kertal added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Nov 14, 2024
@thomasneirynck
Copy link
Contributor Author

thomasneirynck commented Nov 14, 2024

@kertal

One question, would't CBOR instead of JSON introduce another barrier in debugging problems?

Yes, 100% agreed. That would be a drawback.

It would come down to make a trade-off between the gain (if any) and a decrease of debugability. We do not have a good idea of the gain at this point.

@kertal kertal pinned this issue Nov 14, 2024
@kertal kertal unpinned this issue Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:low Addressing this issue will have a low 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.
Projects
None yet
Development

No branches or pull requests

3 participants