-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(api): add http/grpc interface rate limit #5502
Conversation
@@ -62,7 +63,7 @@ private void addRateContainer() { | |||
|
|||
} else { | |||
constructor = c.getConstructor(); | |||
obj = constructor.newInstance(); | |||
obj = constructor.newInstance("qps=" + QPS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this "qps" and later should use STRATEGY_PARAM_QPS in QpsStrategy
ed01b09
to
4f9b768
Compare
} else { | ||
constructor = c.getConstructor(); | ||
obj = constructor.newInstance(); | ||
obj = constructor.newInstance(QpsStrategy.DEFAULT_QPS_PARAM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the default initial logic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## release_v4.7.3 #5502 +/- ##
====================================================
+ Coverage 64.90% 65.00% +0.09%
- Complexity 10001 10018 +17
====================================================
Files 894 894
Lines 53799 53806 +7
Branches 5920 5921 +1
====================================================
+ Hits 34920 34978 +58
+ Misses 16168 16117 -51
Partials 2711 2711
... and 13 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -59,34 +55,29 @@ private void addRateContainer() { | |||
constructor = c.getConstructor(String.class); | |||
obj = constructor.newInstance(params); | |||
container.add(KEY_PREFIX_HTTP, getClass().getSimpleName(), (IRateLimiter) obj); | |||
|
|||
} else { | |||
constructor = c.getConstructor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constructor = c.getConstructor(String.class)?
What does this PR do?
add http/grpc interface rate limit, refer to issue #5390
Why are these changes required?
This PR has been tested by:
Follow up
Extra details