-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add RateLimitPolicy #903
Merged
martincostello
merged 43 commits into
App-vNext:v723-or-v730
from
martincostello:Rate-Limiter-Policy
Jan 17, 2022
Merged
Add RateLimitPolicy #903
martincostello
merged 43 commits into
App-vNext:v723-or-v730
from
martincostello:Rate-Limiter-Policy
Jan 17, 2022
Conversation
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
Remove the LockBasedTokenBucketRateLimiter class which isn't used other than in tests.
Throw ArgumentNullException instead of NullReferenceException.
Pass the invalid value when throwing ArgumentOutOfRangeException.
Seal the LockFreeTokenBucketRateLimiter class.
Make the RateLimiterFactory class static.
Add parenthesis to operation to make it clearer.
Use the always-unambiguous `string` keyword instead of `String`. See https://blog.paranoidcoding.com/2019/04/08/string-vs-String-is-not-about-style.html.
Bump the next version to 7.3.0.
martincostello
commented
Dec 2, 2021
Fix exception message typos. Add access modifier. Remove blank line after comment.
If there's no feedback forthcoming, I'll aim to move forward with this on or after Monday 17th January. |
martincostello
commented
Jan 14, 2022
Add documentation for the RateLimit policy.
Update to the highest 0.x version of Cake and pin to use a version of Cake.FileHelpers and Cake.Yaml released in the same time frame.
Suppress a NuGet package being created by the benchmarks project.
This was referenced Jan 17, 2022
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.
The issue or feature being addressed
#260 Rate limiting
This PR takes all the changes from #666 which was originally authored by @reisenberger and makes the following additional changes:
LockBasedTokenBucketRateLimiter
class.ArgumentNullException
instead ofNullReferenceException
.ArgumentOutOfRangeException
is thrown.static
orsealed
.string
overString
.7.3.0
.We've been using the original rate-limiter changes from #666 successfully in production at Just Eat since March 2020 and have had no issues with it, and it has served our use case well. Via that usage it has also gone through a lot of production usage at scale, so based on our experiences I would consider the changes in this PR ready as-is.
As @reisenberger isn't currently available to commit his time to this project to complete the work, I'm going to treat this PR as the successor, but it is still open for additional review by the community before it is merged. Comments are welcome and encouraged.
I propose merging this in January 2022 for a Polly v7.3.0 release if there are no objections and no further feedback that should be addressed. I feel a month for further comments and review is a reasonable period for this, considering the original PR has had no new feedback (other than "when will this be merged?" 😃) since March 2021.
Confirm the following
I started this PR by branching from the head of the latest dev vX.Y branch, or I have rebased on the latest dev vX.Y branch, orI have merged the latest changes from the dev vX.Y branch