-
Notifications
You must be signed in to change notification settings - Fork 3.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
[feature](meta-service) Support querying and adjusting rpc qps limit on meta service #42413
[feature](meta-service) Support querying and adjusting rpc qps limit on meta service #42413
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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.
clang-tidy made some suggestions
@@ -19,10 +19,13 @@ | |||
|
|||
#include <brpc/server.h> |
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.
warning: 'brpc/server.h' file not found [clang-diagnostic-error]
#include <brpc/server.h>
^
928d926
to
453770f
Compare
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.
clang-tidy made some suggestions
@@ -17,8 +17,11 @@ | |||
|
|||
#include "rate-limiter/rate_limiter.h" |
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.
warning: 'rate-limiter/rate_limiter.h' file not found [clang-diagnostic-error]
#include "rate-limiter/rate_limiter.h"
^
cb4d256
to
063ca50
Compare
run buildall |
063ca50
to
ebe7ddf
Compare
run buildall |
ebe7ddf
to
e3098ab
Compare
run buildall |
run buildall |
c6532ab
to
e541fab
Compare
run buildall |
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.
clang-tidy made some suggestions
e541fab
to
c997f0d
Compare
run buildall |
Add some usage examples in description. |
c997f0d
to
1b6cbea
Compare
run buildall |
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.
clang-tidy made some suggestions
qps_limit_str, rpc_name, instance_id)); | ||
}; | ||
|
||
static auto parse_qps_limit = |
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.
it seems that abuse using lambdas
}); | ||
}; | ||
|
||
// for 8 element in true table of params, register processor cb |
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 part is confusing
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.
Maybe I'll add some comments, just register different callback for different params pattern, and the "abuse" of lamda are just meant to adapt for this.
run buildall |
84e350b
to
70f9607
Compare
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
run compile |
run cloud_p0 |
run p0 |
run external |
…on meta service (#42413) ## Proposed changes Usage 1. adjust limit ``` curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?${params} ``` | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit | |behavior | set qps_limit global default value | |example|```curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000```| | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit, string rpc_name | |behavior | set RPC specific qps_limit | |example|curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster| | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit, string rpc_name, string instance_id | |behavior | set instance qps_limit for specific RPC | |example|```ccurl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster&instance_id="doris-0"```| | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit, string instance_id | |behavior | set global qps_limit for specific instance | |example|```curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&instance_id="doris-0"```| 2. query limit | Entry | Description | | ----------- | ----------- | | param | none | |behavior | query qps limit for all RPC interface | |example|```curl http://ms_ip:ms_port/MetaService/http/v1/list_rate_limit```|
…on meta service (#42413) ## Proposed changes Usage 1. adjust limit ``` curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?${params} ``` | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit | |behavior | set qps_limit global default value | |example|```curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000```| | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit, string rpc_name | |behavior | set RPC specific qps_limit | |example|curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster| | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit, string rpc_name, string instance_id | |behavior | set instance qps_limit for specific RPC | |example|```ccurl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster&instance_id="doris-0"```| | Entry | Description | | ----------- | ----------- | | param | uint64 qps_limit, string instance_id | |behavior | set global qps_limit for specific instance | |example|```curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&instance_id="doris-0"```| 2. query limit | Entry | Description | | ----------- | ----------- | | param | none | |behavior | query qps limit for all RPC interface | |example|```curl http://ms_ip:ms_port/MetaService/http/v1/list_rate_limit```|
Proposed changes
Usage
curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000
ccurl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&rpc_name=get_cluster&instance_id="doris-0"
curl http://ms_ip:ms_port/MetaService/http/v1/adjust_rate_limit?qps_limit=5000000&instance_id="doris-0"
curl http://ms_ip:ms_port/MetaService/http/v1/list_rate_limit