New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(middleware/ratelimit): add rate limiter middleware #1271
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1271 +/- ##
=======================================
Coverage 64.68% 64.68%
=======================================
Files 63 63
Lines 2917 2917
=======================================
Hits 1887 1887
Misses 871 871
Partials 159 159 Continue to review full report at Codecov.
|
是不是可以把bbr搞进来了?@kagaya85 |
我们是在使用的时候让用户再传入对应的limiter实现还是直接内置bbr算法? |
f13d669
to
4aee91d
Compare
默认就bbr吧,也支持手动设置 |
采用默认的方式可能需要产生额外的依赖,我先修改一下看一下 |
acb6b20
to
16c95ac
Compare
e3712da
to
e18457d
Compare
Add Limiter middleware
part of #889
cpu
package or the entire middleware, see [Suggest] 建议将 kratos 仓库中的 middleware 单独仓库管理 #1230PTAL @longXboy @tonybase, Thanks : )