You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Nebojsa Simic (Jira)" <ji...@apache.org> on 2026/03/02 15:49:00 UTC

[jira] [Created] (KAFKA-20243) TCP connection count per client.id

Nebojsa Simic created KAFKA-20243:
-------------------------------------

             Summary: TCP connection count per client.id
                 Key: KAFKA-20243
                 URL: https://issues.apache.org/jira/browse/KAFKA-20243
             Project: Kafka
          Issue Type: Improvement
          Components: core, metrics
            Reporter: Nebojsa Simic


The main idea is to introduce a metric that tracks TCP connection counts per ClientID. This can improve visibility into resource utilization of specific producers and consumers, per IP address is to coarse plus many clients can be on the same address in scenarios I deal with.

Add an opt-in ClientID connection count gauge to each broker's network processor.

When a TCP connection is established, it starts in an "unknown" bucket. On the first request, the broker extracts the ClientID from the request header and moves the connection into the correct bucket. When the connection closes, the bucket is decremented. The result is a live gauge showing how many active connections each ClientID holds, per listener and network processor.

The feature is gated behind a broker config flag, so there is zero impact to existing deployments. Operators enable it when they need the visibility.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)