RFC 211: We should apply a per user and total limit to user added repos
Created by: ryanslade
We should limit the number of repos that can be added by users
-
Limit the number of repos per user -
Limit the total number of user added repos -
Fire an alert when we are approaching the total limit
The above limits will need to be enforced during sync and should be included both during streaming insertion of repos and batch syncing.
It should be configurable but include sane defaults. The point of this is to protect an instance against abuse so the number should be high enough that they are not hit based on normal usage.
User repos from code hosts should be ordered deterministically so that once they are over the limit we don't randomly add and remove repos on each sync.
The discussion around how we notify end users can begin here but we will not implement it as part of this issue.