-
Notifications
You must be signed in to change notification settings - Fork 93
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
Method for checking if over limit w/o updating #1
Comments
Implemented atLimit() for reds
Replaced atLimit() with geLimit()
HI Chris, Thanks for taking the time to write up your suggestion for a pull request. I would most definitely be happy to accept this pull request. An incorrect password attempt count seems to be a common scenario that people are looking for the library to support. Cheers, |
Thanks Chris - I've taken a look at your changes and they look good, appreciate the effort. I should get some time this weekend to add a few more tests and merge in your branch. Cheers, |
Great, thanks Craig. I'd originally thought to add an |
* Method for checking if over limit w/o updating Implemented for InMemory and Hazelcast * #1: Method for checking if over limit w/o updating Implemented atLimit() for reds * #1: Method for checking if over limit w/o updating Replaced atLimit() with geLimit() * #1: Method for checking if over limit w/o updating * #1: Method for checking if over limit w/o updating
Craig, thanks for merging my pull request. Will you publish version 0.3.4 with the changes to maven soon so I can use that instead of my local build? Thanks |
I will push out a 4.0-RC over the weekend as I'm going to change some of the method names to better communicate the action. |
0.4.0.M1 released to maven central and should be available in a few hours. |
Thanks, I've updated to use that and all is well. Much appreciated! |
Hi, your library looks great, with the best-of-breed sliding window algorithm and the pluggable backends!
I've got a use case that it doesn't support very well though, where I need to check if the limit has been reached without incrementing it if not. We're going to track login failures, and once we've reached the limit, disallow further login attempts. So we first need to check if the failure rate has reached limit, and only then allow the request and increment the count if it fails.
So I'm thinking of adding another method to RequestRateLimiter to enable this, say
Looking at the implementation code, this would be easily implemented since it's a slight variant of the existing code for overlimit().
Would you be open to a pull request if I add this?
thx,
Chris
The text was updated successfully, but these errors were encountered: