gavinchou commented on code in PR #60855:
URL: https://github.com/apache/doris/pull/60855#discussion_r3321956229


##########
fe/fe-common/src/main/java/org/apache/doris/common/Config.java:
##########
@@ -3501,6 +3501,83 @@ public static int metaServiceRpcRetryTimes() {
     @ConfField(mutable = true, masterOnly = true)
     public static boolean enable_notify_be_after_load_txn_commit = false;
 
+    
//==========================================================================
+    //                      cloud meta service rpc limiter config
+    
//==========================================================================
+    @ConfField(mutable = true, description = {"Whether to enable rate limiting 
for meta-service RPC calls"})
+    public static boolean meta_service_rpc_rate_limit_enabled = true;
+
+    @ConfField(mutable = true, description = {
+            "Default QPS limit for each method (requests per second) in each 
cpu core, "
+                    + "non-positive value (<= 0) means no limit"})
+    public static int meta_service_rpc_rate_limit_default_qps_per_core = 10;
+
+    @ConfField(mutable = true, description = {
+            "Maximum waiting requests per method, requests exceeding this will 
be rejected immediately"})
+    public static int meta_service_rpc_rate_limit_max_waiting_request_num = 
100;
+
+    @ConfField(mutable = true, description = {"Maximum wait time (ms) to 
acquire a token, request fails if timeout"})
+    public static long meta_service_rpc_rate_limit_wait_timeout_ms = 5000;
+
+    @ConfField(mutable = true, description = {"QPS limit config per rpc method 
to meta service in per cpu core, "
+            + "format: method1:qps1;method2:qps2, e.g.: 
getVersion:100;getTabletStats:50, "
+            + "non-positive value (<= 0) means no limit"})
+    public static String meta_service_rpc_rate_limit_qps_per_core_config = "";
+
+    @ConfField(mutable = true, description = {
+            "Cost limit config per method in per cpu core, format: 
method1:cost1;method2:cost2, "
+                    + "e.g.: getVersion:1000;getTabletStats:50, non-positive 
value (<= 0) means no limit. "
+                    + "The cost is calculated based on the estimated number of 
kv accesses required by the rpc"})
+    public static String meta_service_rpc_cost_limit_per_core_config = 
"getVersion:5000";
+
+    @ConfField(mutable = true, description = {"If the meta-service RPC cost 
exceeds the limit, "
+            + "it will be adjusted to the limit value to prevent RPCs with 
high costs from failing to execute."})
+    public static boolean meta_service_rpc_cost_clamped_to_limit_enabled = 
true;
+
+    @ConfField(mutable = true, description = {
+            "Whether to enable overload throttle (auto-adjust QPS based on 
timeout and server backpressure)"})
+    public static boolean meta_service_rpc_overload_throttle_enabled = true;

Review Comment:
   naming meta_service_rpc_overload_throttle_enabled -> 
enable_meta_service_rpc_overload_throttle



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to