Skip to content
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

Reconfiguration caused unexpected behavior #54

Open
whitehatboxer opened this issue Mar 15, 2021 · 0 comments
Open

Reconfiguration caused unexpected behavior #54

whitehatboxer opened this issue Mar 15, 2021 · 0 comments

Comments

@whitehatboxer
Copy link

Firstly, it works good, as we can seen below.

127.0.0.1:6579> CL.THROTTLE user1 15 10 20 1
1) (integer) 0
2) (integer) 16
3) (integer) 15
4) (integer) -1
5) (integer) 2
127.0.0.1:6579> CL.THROTTLE user1 15 10 20 1
1) (integer) 0
2) (integer) 16
3) (integer) 15
4) (integer) -1
5) (integer) 2
127.0.0.1:6579> CL.THROTTLE user1 15 10 20 1
1) (integer) 0
2) (integer) 16
3) (integer) 14
4) (integer) -1
5) (integer) 3
127.0.0.1:6579> CL.THROTTLE user1 15 10 20 1
1) (integer) 0
2) (integer) 16
3) (integer) 13
4) (integer) -1
5) (integer) 4
...

Then I tried reconfigured it. I just increased rate and it caused unexpected behavior. The returned values got deny. Why it returned deny since I increased rate?

127.0.0.1:6579> CL.THROTTLE user1 15 10 20 1
1) (integer) 0
2) (integer) 16
3) (integer) 13
4) (integer) -1
5) (integer) 4
127.0.0.1:6579> CL.THROTTLE user1 15 1000 20 1
1) (integer) 1
2) (integer) 16
3) (integer) 0
4) (integer) 2
5) (integer) 2
127.0.0.1:6579> CL.THROTTLE user1 15 1000 20 1
1) (integer) 1
2) (integer) 16
3) (integer) 0
4) (integer) 1
5) (integer) 1

I guess it is because time need reset to its maximum capacity is not zero so when I change configuration it will deny unit it run out of last seconds. And I think it was not conforming to the statement in readme which said: Rate limiting parameters are provided with every invocation so that limits can easily be reconfigured on the fly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant