Frontend cleanup and perf improvement#3996
Merged
joe-elliott merged 5 commits intografana:mainfrom Aug 23, 2024
Merged
Conversation
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Contributor
|
I wonder if we should rename "users" to "tenants". It's pretty confusing already |
| const ( | ||
| // How frequently to check for disconnected queriers that should be forgotten. | ||
| forgetCheckPeriod = 5 * time.Second | ||
| forgetCheckPeriod = 30 * time.Second // every 30 seconds b/c the the stopping code requires there to be no queues. i would like to make this 5-10 minutes but then shutdowns would be blocked |
Member
There was a problem hiding this comment.
should we put this info somewhere in docs? feel like an internal detail so not sure if we should.
Collaborator
Author
There was a problem hiding this comment.
not sure where i would do that
electron0zero
approved these changes
Aug 23, 2024
Signed-off-by: Joe Elliott <number101010@gmail.com>
Collaborator
Author
We should drift towards "tenant", but I'm not willing to take that on in this PR. |
javiermolinar
approved these changes
Aug 23, 2024
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:
This PR cleans up unused code that Tempo inherited that allows the configuration of the max number of queriers a tenant has access to. This code is complicating attempts to improve this element of the frontend. It is currently unused and not even usable.
Additionally, I've moved the clean up of user queues to a timer. This prevents "flapping" of user queue creation/deletion. Currently, we delete the queue if we notice it has 0 jobs. This requires us to over provision go routines to shove jobs into the queue to prevent it from being constantly recreated. This PR should allow us to reduce the number of goroutines used to put pressure on the user queues lock and achieve the same query performance.
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]