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

API Rate Limiter #14

Open
JacobLinCool opened this issue Nov 8, 2022 · 0 comments
Open

API Rate Limiter #14

JacobLinCool opened this issue Nov 8, 2022 · 0 comments

Comments

@JacobLinCool
Copy link
Member

I would like to implement a rate limiter based on the time usage of actions.

In a time interval (maybe 15 minutes):

  • Every user has 500 ms credits.
  • If a user has a verified trait, then it gets 2000 ms extra credits.
  • If a user has other traits, it may get extra credits.

In the above scenario, we can serve around 300 users at once:

$(15 \times 60) \div (0.5 + 2) = 360 \Rightarrow 300$ (We need some resources to do checks and other chores)

Since we do not have extra machines to do scaling and we haven't thought about it, a rate limiter would be necessary.

I do believe that we can scale, but more research must be done.

Feel free to discuss the topic, thanks.

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

No branches or pull requests

1 participant