Skip to content

Skip instant query round tripper if sharding is not applicable. #5062

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

Merged
merged 3 commits into from
Jan 3, 2023

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Dec 25, 2022

Signed-off-by: Ben Ye [email protected]

What this PR does:

From the trace, the instant query tripperware adds some overhead for response serilization/deserilization. For this example, it takes 15s+ while the whole query time is 23s.

image

The issue is, if the tenant doesn't enable vertical sharding, or the query itself is not even shardable, the additional overhead is still there and we don't have a way to skip that. This pr checks whether vertical sharding is applicable before passing the request down to the tripperware.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with minor nits

@yeya24
Copy link
Contributor Author

yeya24 commented Dec 30, 2022

@friedrichg Thanks for the review! Updated my pr. PTAL

@yeya24 yeya24 enabled auto-merge (squash) January 1, 2023 20:48
@yeya24 yeya24 merged commit fe25f66 into cortexproject:master Jan 3, 2023
@yeya24 yeya24 deleted the go-downstream branch January 3, 2023 17:13
@yeya24 yeya24 mentioned this pull request Mar 8, 2023
3 tasks
alexqyle pushed a commit to alexqyle/cortex that referenced this pull request May 2, 2023
…exproject#5062)

* Skip instant query round tripper if sharding is not applicable.

Signed-off-by: Ben Ye <[email protected]>

* address review comments

Signed-off-by: Ben Ye <[email protected]>

* update changelog

Signed-off-by: Ben Ye <[email protected]>

Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: Alex Le <[email protected]>
@yeya24 yeya24 mentioned this pull request Sep 13, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants