apovzner commented on a change in pull request #9555: URL: https://github.com/apache/kafka/pull/9555#discussion_r518269240
########## File path: core/src/main/scala/kafka/network/SocketServer.scala ########## @@ -1189,6 +1189,7 @@ class ConnectionQuotas(config: KafkaConfig, time: Time, metrics: Metrics) extend @volatile private var defaultMaxConnectionsPerIp: Int = config.maxConnectionsPerIp @volatile private var maxConnectionsPerIpOverrides = config.maxConnectionsPerIpOverrides.map { case (host, count) => (InetAddress.getByName(host), count) } @volatile private var brokerMaxConnections = config.maxConnections + @volatile private var interBrokerListenerName = config.interBrokerListenerName Review comment: Good point and definitely agree that `config.interBrokerListenerName` could be expensive as we call it several times per accepting a new connection. The issue here is that interBrokerListenerName is a dynamic config. So, you will need to update the cached value on changes to that config; similar how we notify ConnectionQuotas about config changes from SocketServer.reconfigure(). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org