Swap querier /api/search and remaining endpoints to proto#3944
Merged
mdisibio merged 3 commits intografana:mainfrom Aug 7, 2024
Merged
Swap querier /api/search and remaining endpoints to proto#3944mdisibio merged 3 commits intografana:mainfrom
mdisibio merged 3 commits intografana:mainfrom
Conversation
…ng from json to proto internally between frontend and queriers
Contributor
There was a problem hiding this comment.
Looks good, should we keep this?
Line 453 in 8cac9f5
If none of these endpoints are going to return a json response maybe we can delete it
joe-elliott
approved these changes
Aug 7, 2024
Collaborator
joe-elliott
left a comment
There was a problem hiding this comment.
nice cleanup and perf improvement
| // All communication with the queriers should be proto for efficiency | ||
| // NOTE - This isn't strict and queriers may still return json if we missed | ||
| // an endpoint. But cache and response unmarshalling still work. | ||
| req.Header.Set(api.HeaderAccept, api.HeaderAcceptProtobuf) |
Collaborator
i'd like to keep it so that curling the queriers directly will return json. there may be other good/bad reasons for it to be around |
Contributor
Author
+1 Agree good for troubleshooting. Occasionally I use it to replay a single job shard against a querier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What this PR does:
Follow up to #3745 and #3731 . Swaps /api/search and almost all remaining endpoints (except metrics summary api), to use proto between the frontend and queriers. Improves latency, cpu, and memory. Now that this is universal for all communication between frontend and queriers, did the next step of cleanup and centralized in
prepareRequestForQueriers.For a bit more context - this started out as troubleshooting performance and resource usage for some searches. When limit and spans per spanset are high, it reached a point where the json encoding/decoding was the bottleneck. For example limit=1000 and spss=100, means up to 100K spans per job. This could easily lead to 100MB+ json response sizes.
Which issue(s) this PR fixes:
Fixes n/a
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]