jsancio commented on code in PR #20356:
URL: https://github.com/apache/kafka/pull/20356#discussion_r2279395975


##########
core/src/main/scala/kafka/server/KafkaRequestHandler.scala:
##########
@@ -93,7 +93,8 @@ class KafkaRequestHandler(
   val requestChannel: RequestChannel,
   apis: ApiRequestHandler,
   time: Time,
-  nodeName: String = "broker"
+  nodeName: String = "broker",
+  val isCombinedMode: Boolean = false,

Review Comment:
   This is a very ad-hoc solution which assumes one or two request handler 
pool(s). To solve this problem, I see two options:
   1. Keep track of the number of threads in a pool and the number of threads 
across all of the request handler pools. The metrics would use the global count 
when computing the average thread idle ratio.
   2. Have two different metrics for the broker's request handler versus the 
controller's request handler. This would of course require a KIP.
   
   I am leaning toward options 1 for now. In the future we can always do option 
2. which would at a high-level define 3 metrics:
   1. RequestHandlerAvgIdlePercent which reports the thread idle ratio for all 
of the request pools
   2. BrokerRequestHandlerAvgIdlePercent which reports the thread idle ratio 
for the broker request pool
   3. ControllerRequestHandlerAvgIdlePercent which reports the thread idle 
ration for the controller request pool.



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to