-
Notifications
You must be signed in to change notification settings - Fork 2.2k
storeapi: enable batching of series per SeriesResponse #8623
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
Open
adezxc
wants to merge
3
commits into
thanos-io:main
Choose a base branch
from
adezxc:store_batchapi
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Author
|
Benchmark results with fake, repeating labels on my laptop: |
8d67a44 to
ce4289c
Compare
Signed-off-by: adezxc <[email protected]>
Signed-off-by: adezxc <[email protected]>
9b3be60 to
e629f33
Compare
33af256 to
d8b3ac0
Compare
Signed-off-by: adezxc <[email protected]>
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.
This PR adds a
batchfield to theSeriesResponsemessage and allows for sending/receivingmultiple Series per request.
The size of the batch is set using
query.series-response-batch-sizeflag and is included inSeriesRequest.If the StoreAPI is running an older version it will just send series one-by-one, this way keeping backwards-compatibility.
Original suggestion: #7929
Changes
SeriesBatch batchfield toSeriesResponsebatchableServerstruct that accumulates forwarded responses into an array.RespSetand*seriesServer.Sendfunctions to handle batches correctly.Verification
Some tests, benchmarks are included. We are running this change in production for a few weeks and the network savings are big with
query.series-response-batch-size=50, queriers also seem to use a bit less CPU.