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

change dictionary #110

Closed
wants to merge 1 commit into from
Closed

change dictionary #110

wants to merge 1 commit into from

Conversation

abbassep3200
Copy link

@abbassep3200 abbassep3200 commented Mar 4, 2020

I think in projects with more than a few thousand simultaneous users we need that change. What do you think?

@cristipufu
Copy link
Collaborator

I fail to see the need for rulesDict to be thread safe. Do you mind sharing more details? Is this actually an issue? How can I reproduce it, etc?

@abbassep3200
Copy link
Author

abbassep3200 commented Mar 7, 2020

We have a scenario in which thirty thousand simultaneous requests are sent to the server per second. Our concern now is that in such a volume of requests this library will reduce server performance. I want to ask you whether this library has been tested under heavy loads?
Thanks

@cristipufu
Copy link
Collaborator

Each request should have its own dictionary instance, so this shouldn't be an issue.

Regarding the performance however, if all those requests are hitting the same rate limit, there's a lock in place to make sure that the limit is not overcome, so yes, that will reduce server performance.

If you're looking for something to work under heavy load, with multiple app instance nodes, you should implement something like this: #83 (comment) (using Redis INCR)

@cristipufu cristipufu closed this Jul 24, 2020
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

Successfully merging this pull request may close these issues.

2 participants