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
rate_limit: Adds a --rate option for RPS limits #11271
base: master
Are you sure you want to change the base?
Conversation
66cd3f7
to
b3d25e7
Compare
Being a token bucket algorithm, which refills tokens every 25ms evenly distributed, it's not 100% accurate. Doing a h2load test, full blast, with ATS configured with --rate=10000, I get
This is 10,158 RPS which are not rejected, which is pretty close to the target of 10k. |
ff8a312
to
61d1fa4
Compare
|
||
#include "limiter.h" | ||
|
||
BucketManager gBucketMngr; |
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 not make all the members of BucketManager
static, and delete the default and copy constructors? Why does it have protected members, what class would ever inherit from BucketManager?
|
||
}; // End class BucketManager | ||
|
||
extern BucketManager gBucketMngr; | ||
|
||
// order must align with the above | ||
static const char *types[] = { |
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.
Seeing this on the CI builds:
../plugins/experimental/rate_limit/limiter.h:168:20: error: 'suffixes' defined but not used [-Werror=unused-variable]
168 | static const char *suffixes[] = {
| ^~~~~~~~
../plugins/experimental/rate_limit/limiter.h:152:20: error: 'types' defined but not used [-Werror=unused-variable]
152 | static const char *types[] = {
| ^~~~~
cc1plus: note: unrecognized command-line option '-Wno-vla-extension' may have been intended to silence earlier diagnostics
6943114
to
9f3529c
Compare
No description provided.