Skip to content
代码片段 群组 项目
提交 5bf50c72 编辑于 作者: Fabio Pitino's avatar Fabio Pitino 提交者: Grzegorz Bizon
浏览文件

Support rate limits based on resources used

上级 5dd2e678
No related branches found
No related tags found
无相关合并请求
...@@ -186,6 +186,24 @@ Things we want to build and support by default: ...@@ -186,6 +186,24 @@ Things we want to build and support by default:
1. Logging that will expose limits applied in Kibana. 1. Logging that will expose limits applied in Kibana.
1. An automatically generated documentation page describing all the limits. 1. An automatically generated documentation page describing all the limits.
### Support rate limits based on resources used
One of the problems of our rate limiting system is that values are static
(e.g. 100 requests per minutes) and irrespective of the complexity or resources
used by the operation. For example:
- Firing 100 requests per minute to fetch a simple resource can have very different
implications than creating a CI pipeline.
- Each pipeline creation action can perform very differently depending on the
pipeline being created (small MR pipeline VS large scheduled pipeline).
- Paginating resources after an offset of 1000 starts to become expensive on the database.
We should allow some rate limits to be defiened as `computing score / period` where for
computing score we calculate the milliseconds accumulated (for all requests executed
and inflight) within a given period (for example: 1 minute).
This way if a user is sending expensive requests they are likely to hit the rate limit earlier.
### API to expose limits and policies ### API to expose limits and policies
Once we have an established a consistent way to define application limits we Once we have an established a consistent way to define application limits we
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册