Skip to content

API Rate Limiter #14

@JacobLinCool

Description

@JacobLinCool

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    💬 Discussing

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions