-
Notifications
You must be signed in to change notification settings - Fork 529
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
Frontend cleanup and perf improvement #3996
Conversation
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Love the code clean-up
I wonder if we should rename "users" to "tenants". It's pretty confusing already |
modules/frontend/queue/queue.go
Outdated
) | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we put this info somewhere in docs? feel like an internal detail so not sure if we should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure where i would do that
Signed-off-by: Joe Elliott <number101010@gmail.com>
We should drift towards "tenant", but I'm not willing to take that on in this PR. |
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.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]