acoustic-carpenter-78188
05/08/2023, 1:29 PMuserID and rate per user ID. rate is a native Golang package to track total count of requests.
• The in-memory storage is cleaned periodically to reduce memory footprint.
• The component, which is considered as part of the security scope, relies on the identity of the user provided by auth package. In fact, the best way to uniquely identify requests to rate limit is to track usage per authenticated user.
Tradeoff
• To keep it simple, an in-memory map storage is used to track rate per user. This becomes inaccurate if multiple instances of flyteadmin is deployed. If this is the case and we are serious about rate limit, another improvement is needed, like introduction of Redis for example, which is out of scopes for this PR.
Tracking Issue
_Remove the '_fixes_' keyword if there will be multiple PRs to fix the linked issue_
fixes flyteorg/flyte#327
Follow-up issue
NA
flyteorg/flyteadmin
✅ All checks have passed
2/2 successful checks