-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Implement per-project rate limiter
Limitting
Max N events per T for Project
N and T should be configurable. The best way is to include them to the Plans so each plan can have own values
Initially set these values:
N — 5000 events
T — 5 min
After T time passed, project should continue accept events.
Statistic
Collector should increment rate limited events counter of the project.
API should be able to get that data grouped by hour. We will use it to display them on the Project Events graph like this:

Questions:
- Where to store statistic? Mongo or Redis? Both Collector and Api should be able to access it
- How to store statistic? For example, we can store timestamp without minutes in Mongo — 1 record for 1 hour (
workspace_id | project_id | timestamp-hourly | counter
). Or key likerate-limited:workspaceId:<wid>:projectId:<pid>:<timestamp-hourly>
. Or something other. - Who should insert statistic? Collector itself or separate worker?
Metadata
Metadata
Assignees
Labels
No labels