-
Notifications
You must be signed in to change notification settings - Fork 812
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
[Store Gateway] Token bucket limiter #6016
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
2ad976a
Create TokenBucket
justinjung04 917d2e9
Update bucket stores to pass token bucket
justinjung04 6700b08
Move limiters to a new file
justinjung04 5e78511
Added tests for limiters and token bucket
justinjung04 8ff710e
Add more tests
justinjung04 6c15c92
Added enable flag
justinjung04 6ae585a
Add dryrun feature
justinjung04 bd8b9e7
Add doc
justinjung04 f66aa50
Add changelog
justinjung04 8940823
Lint
justinjung04 7054778
Do not create pod token bucket if the feature is not enabled
justinjung04 cf39c55
More docs
justinjung04 c944474
Address comments
justinjung04 4ed7bcb
Rename podTokenBucket to instanceTokenBucket
justinjung04 3219a44
Updated default values
justinjung04 52518a1
Rename TokenBucketLimiter to TokenBucketBytesLimiter
justinjung04 c5e6968
Changed error to httpgrpc
justinjung04 d0c4fbd
Nit
justinjung04 dff09ce
Increment failure metric when token bucket returns error
justinjung04 8467087
Simplify token bucket by making Retrieve to always deduct token
justinjung04 54c4e49
Throw 429 and 422 for different failure scenarios
justinjung04 26dc6f4
Hide token factors from doc
justinjung04 78a856e
Simplified config by combining dryrun and enabled
justinjung04 3743da2
Merge branch 'master' into sg-token-bucket
justinjung04 c7f6191
Remove test log
justinjung04 faba9b8
Fix tests
justinjung04 172a62d
Fix
justinjung04 5cbd557
Merge branch 'master' into sg-token-bucket
justinjung04 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
nit: The bucket_stores.go can have very minimal changes if all the code can be moved to the limiter.go with another layer of abstraction.