Add support for typed internal pprof transfers #4423
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, pprof data is being sent as raw bytes in responses from query backend nodes, to backend and frontend nodes.
This has the benefit of a tightly controlled serialization and potentially smaller payloads, however tests have shown that letting connectrpc handle serialization results in less overhead for large requests, when combined together with #4422. I am yet to confirm what exactly causes the improvement, my guess is that the manual compression is more resource intense compared to the one from connectrpc but I will try to capture a diff profile to fully understand this.
End-to-end benchmark, with individual profiles having ~100-500k samples, ~50-100k locations, ~10-20k unique strings.
TODO:
Note before merging:
Once #4422 is merged, we should adjust the new aggregator introduced there (pkg/frontend/readpath/queryfrontend/report_aggregator.go) to support typed responses.