Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current state: Under Discussion

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread] 

JIRA:

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-18455

...

Currently, when clients attempt to establish connections to a broker and encounter throttling or exceeding the maximum connection limit (waiting for an available connection slot), the broker does not provide any logs or metrics for these scenarios. Clients only receive connection timeout exceptions, which provide insufficient information for troubleshooting. We can enhance observability and help users effectively diagnose connection issues by implementing additional connection-related metrics.

Public Interfaces

MetricNameTypeGroupTagDescriptionJMX Bean
${listener_name}WaitingConnection
waiting-connectionGaugeAcceptorlistener:<listener_name>Waiting connections for the specific listenerkafka.network:type=Acceptor,name=waiting-connection,listener=
$
{listener_name}
WaitingConnection
connection-latencyHistogramAcceptorlistener: <listener_name>connection wait time for the specific listenerkafka.network:type=Acceptor,name=connection-latency,listener={listener_name}

Proposed Changes

We propose adding metrics described in the Public Interfaces section, which could help users effectively diagnose connection quota issues.

Compatibility, Deprecation, and Migration Plan

N/A.

This is a new metric, and there are no compatibility concerns.

...

  • I/O overhead
  • Storage space issues
  • Identifying critical issues among the massive volume of connection logs would be super annoying.

Using metrics instead of logs provides a more suitable solution for monitoring connection states without the overhead of extensive logging.

...