From 8a40424ebceebeac97c1f8f32e7dddd2b4f1a859 Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 18:57:54 -0800 Subject: [PATCH 01/13] Add conditionalized content for client monitoring in Cloud --- .../configure-client-connections.adoc | 22 +++- .../manage-throughput.adoc | 10 +- modules/manage/partials/monitor-health.adoc | 103 +++++++++++++++++- 3 files changed, 125 insertions(+), 10 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc b/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc index d762ec17fd..489108ef35 100644 --- a/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc +++ b/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc @@ -6,16 +6,32 @@ Optimize the availability of your clusters by configuring and tuning properties. -// Don't display ListKafkaConnections in Cloud docs until support is added ifdef::env-cloud[] -TIP: Before you configure connection limits or reconnection settings, start by gathering detailed data about your client connections. Use the xref:reference:public-metrics-reference.adoc#redpanda_rpc_active_connections[`redpanda_rpc_active_connections` metric] to view current Kafka client connections. +[TIP] +==== +Before you configure connection limits or reconnection settings, start by gathering detailed data about your client connections. + +* Use the xref:reference:public-metrics-reference.adoc#redpanda_rpc_active_connections[`redpanda_rpc_active_connections` metric] to view current Kafka client connections. +* For clusters on v25.3 and later, use `rpk cluster connections list` or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify: ++ +-- +** Which clients and applications are connected +** Long-lived connections and long-running requests +** Connections with no activity +** Whether any clients are causing excessive load +-- ++ +By reviewing connection details, you can make informed decisions about tuning connection limits and troubleshooting issues. + +See also: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[Data Plane API reference], xref:manage:monitor-cloud.adoc#throughput[Monitor Redpanda Cloud] +==== endif::[] ifndef::env-cloud[] [TIP] ==== Before you configure connection limits or reconnection settings, start by gathering detailed data about your client connections. -* Internal metrics that follow the `vectorized_kafka_rpc_.\*connect.*` naming pattern provide details on Kafka client connection activity. For example, xref:reference:internal-metrics-reference.adoc#vectorized_kafka_rpc_active_connections[`vectorized_kafka_rpc_active_connections`] reports the current number of active connections. +* Internal metrics that follow the `vectorized_kafka_rpc_.\*connect*` naming pattern provide details on Kafka client connection activity. For example, xref:reference:internal-metrics-reference.adoc#vectorized_kafka_rpc_active_connections[`vectorized_kafka_rpc_active_connections`] reports the current number of active connections. * For Redpanda v25.3 and later, use `rpk cluster connections list` or the Admin API ListKafkaConnections endpoint to identify: + -- diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index 9a8519c747..f3a765f2ad 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -2,8 +2,14 @@ :description: Learn how to manage the throughput of Kafka traffic. :page-categories: Management, Networking // tag::single-source[] -ifdef::env-cloud[:monitor-doc: manage:monitor-cloud.adoc#throughput] -ifndef::env-cloud[:monitor-doc: manage:monitoring.adoc#throughput] +ifdef::env-cloud[] +:monitor-doc: manage:monitor-cloud.adoc#throughput +:connected-clients-api-doc: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[`GET /v1/monitoring/kafka/connections`] Data Plane API endpoint +endif::[] +ifndef::env-cloud[] +:monitor-doc: manage:monitoring.adoc#throughput +:connected-clients-api-doc: link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections] Admin API endpoint +endif::[] Redpanda supports throughput throttling on both ingress and egress independently, and allows configuration at the broker and client levels. This helps prevent clients from causing unbounded network and disk usage on brokers. You can configure limits at two levels: diff --git a/modules/manage/partials/monitor-health.adoc b/modules/manage/partials/monitor-health.adoc index 6ffc1d5c5d..b1a6e83ca8 100644 --- a/modules/manage/partials/monitor-health.adoc +++ b/modules/manage/partials/monitor-health.adoc @@ -1,6 +1,13 @@ == Monitor for performance and health // tag::single-source[] +ifndef::env-cloud[] +:connected-clients-api-doc: link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[Admin API reference] +endif::[] +ifdef::env-cloud[] +:connected-clients-api-doc: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[Data Plane API reference] +endif::[] + This section provides guidelines and example queries using Redpanda's public metrics to optimize your system's performance and monitor its health. To help detect and mitigate anomalous system behaviors, capture baseline metrics of your healthy system at different stages (at start-up, under high load, in steady state) so you can set thresholds and alerts according to those baselines. @@ -125,11 +132,15 @@ For the consume rate, create a query to get the total consume rate across all to rate(redpanda_rpc_sent_bytes{redpanda_server="kafka"}[$__rate_interval]) ---- -// Don't display ListKafkaConnections in Cloud docs until support is added -ifndef::env-cloud[] + ==== Identify high-throughput clients -Use `rpk cluster connections list` or the ListKafkaConnections service in Admin API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +ifndef::env-cloud[] +Use `rpk cluster connections list` or the ListKafkaConnections endpoint in Admin API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +endif::[] +ifdef::env-cloud[] +Use `rpk cluster connections list` or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +endif::[] For example, to list connections with a current produce throughput greater than 1MB, run: @@ -227,10 +238,92 @@ curl -s -X POST "localhost:9644/redpanda.core.admin.v2.ClusterService/ListKafkaC ---- ==== -- -====== -You can adjust the filter and sorting criteria as necessary. See the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[Admin API reference] for more details. +ifdef::env-cloud[] +Data Plane API:: ++ +-- +[,bash] +---- +curl \ + --request GET 'https:///v1/monitoring/kafka/connections' \ + --header "Authorization: Bearer $ACCESS_TOKEN" \ + --data '{"filter":"recent_request_statistics.produce_bytes > 1000000", "order_by":"recent_request_statistics.produce_bytes desc"}' | jq +---- + +.Show example API response +[%collapsible] +==== +[,bash,role=no-copy,lines=54] +---- +{ + "connections": [ + { + "node_id": 0, + "shard_id": 0, + "uid": "b20601a3-624c-4a8c-ab88-717643f01d56", + "state": "KAFKA_CONNECTION_STATE_OPEN", + "open_time": "2025-10-15T14:15:15.755065000Z", + "close_time": "1970-01-01T00:00:00.000000000Z", + "authentication_info": { + "state": "AUTHENTICATION_STATE_UNAUTHENTICATED", + "mechanism": "AUTHENTICATION_MECHANISM_UNSPECIFIED", + "user_principal": "" + }, + "listener_name": "", + "tls_info": { + "enabled": false + }, + "source": { + "ip_address": "127.0.0.1", + "port": 55012 + }, + "client_id": "perf-producer-client", + "client_software_name": "apache-kafka-java", + "client_software_version": "3.9.0", + "transactional_id": "my-tx-id", + "group_id": "", + "group_instance_id": "", + "group_member_id": "", + "api_versions": { + "18": 4, + "22": 3, + "3": 12, + "24": 3, + "0": 7 + }, + "idle_duration": "0s", + "in_flight_requests": { + "sampled_in_flight_requests": [ + { + "api_key": 0, + "in_flight_duration": "0.000406892s" + } + ], + "has_more_requests": false + }, + "total_request_statistics": { + "produce_bytes": "78927173", + "fetch_bytes": "0", + "request_count": "4853", + "produce_batch_count": "4849" + }, + "recent_request_statistics": { + "produce_bytes": "78927173", + "fetch_bytes": "0", + "request_count": "4853", + "produce_batch_count": "4849" + } + } + ] +} +---- +==== +-- endif::[] +====== + +You can adjust the filter and sorting criteria as necessary. See the {connected-clients-api-doc} for more details. === Latency From 35649af6645b225704e72c649319e6917601c05f Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 19:04:02 -0800 Subject: [PATCH 02/13] Fix link ref in rpk cluster connections list --- .../pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc index 0d780277e1..09c408317e 100644 --- a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc +++ b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc @@ -6,7 +6,7 @@ This command displays a table of active and recently closed connections within t Use filtering and sorting to identify the connections of the client applications that you are interested in. See `--help` for the list of filtering arguments and sorting arguments. -In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the [ListKafkaConnections endpoint](https://docs.redpanda.com/api/doc/admin/version/11f41833-5783-4f1a-ad64-5957267abd52/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections): +In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections endpoint]: By default only a subset of the per-connection data is printed. To see all of the available data, use `--format=json`. From c8ec4296337cf863a1564e015c30be5cc1f28eef Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 19:36:52 -0800 Subject: [PATCH 03/13] Add link to rpk cluster connections reference --- .../cluster-maintenance/configure-client-connections.adoc | 2 +- .../manage/pages/cluster-maintenance/manage-throughput.adoc | 2 +- modules/manage/partials/monitor-health.adoc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc b/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc index 489108ef35..af03310801 100644 --- a/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc +++ b/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc @@ -12,7 +12,7 @@ ifdef::env-cloud[] Before you configure connection limits or reconnection settings, start by gathering detailed data about your client connections. * Use the xref:reference:public-metrics-reference.adoc#redpanda_rpc_active_connections[`redpanda_rpc_active_connections` metric] to view current Kafka client connections. -* For clusters on v25.3 and later, use `rpk cluster connections list` or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify: +* For clusters on v25.3 and later, use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify: + -- ** Which clients and applications are connected diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index f3a765f2ad..7356a89f6d 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -27,7 +27,7 @@ endif::[] You may find it helpful to check the xref:{monitor-doc}[current produce and consume throughput] of a client before you configure throughput quotas. -Use the `rpk cluster connections list` command or the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections] Admin API endpoint to view detailed information about active Kafka client connections. +Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the {connected-clients-api-doc} to view detailed information about active Kafka client connections. For example, to view a cluster's connected clients in order of highest current produce throughput, run: diff --git a/modules/manage/partials/monitor-health.adoc b/modules/manage/partials/monitor-health.adoc index b1a6e83ca8..a0680e6c7c 100644 --- a/modules/manage/partials/monitor-health.adoc +++ b/modules/manage/partials/monitor-health.adoc @@ -136,10 +136,10 @@ rate(redpanda_rpc_sent_bytes{redpanda_server="kafka"}[$__rate_interval]) ==== Identify high-throughput clients ifndef::env-cloud[] -Use `rpk cluster connections list` or the ListKafkaConnections endpoint in Admin API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +Use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the ListKafkaConnections endpoint in Admin API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. endif::[] ifdef::env-cloud[] -Use `rpk cluster connections list` or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +Use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. endif::[] For example, to list connections with a current produce throughput greater than 1MB, run: From ba5586335ff129c651229bf173706980c4fe27ff Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 20:51:29 -0800 Subject: [PATCH 04/13] Fix API example for Cloud --- .../manage-throughput.adoc | 92 ++++++++++++++++++- modules/manage/partials/monitor-health.adoc | 2 + .../rpk-cluster-connections-list.adoc | 2 +- 3 files changed, 94 insertions(+), 2 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index 7356a89f6d..99e9054d8c 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -56,6 +56,7 @@ b41584f3-2662-4185-a4b8-0d8510f5c780 OPEN UNAUTHENTICATED perf-producer-clie ---- -- +ifndef::env-cloud[] curl:: + -- @@ -141,6 +142,95 @@ curl -s -X POST \ ---- ==== -- +endif::[] + +ifdef::env-cloud[] +Data Plane API:: ++ +-- +[,bash] +---- +curl \ + --request GET 'https:///v1/monitoring/kafka/connections' \ + --header "Authorization: Bearer $ACCESS_TOKEN" \ + --data '{ + "filter": "", + "order_by": "recent_request_statistics.produce_bytes desc" + }' +---- + +.Show example API response +[%collapsible] +==== +[,json,role=no-copy,lines=54] +---- +{ + "connections": [ + { + "node_id": 0, + "shard_id": 0, + "uid": "b20601a3-624c-4a8c-ab88-717643f01d56", + "state": "KAFKA_CONNECTION_STATE_OPEN", + "open_time": "2025-10-15T14:15:15.755065000Z", + "close_time": "1970-01-01T00:00:00.000000000Z", + "authentication_info": { + "state": "AUTHENTICATION_STATE_UNAUTHENTICATED", + "mechanism": "AUTHENTICATION_MECHANISM_UNSPECIFIED", + "user_principal": "" + }, + "listener_name": "", + "tls_info": { + "enabled": false + }, + "source": { + "ip_address": "127.0.0.1", + "port": 55012 + }, + "client_id": "perf-producer-client", + "client_software_name": "apache-kafka-java", + "client_software_version": "3.9.0", + "transactional_id": "my-tx-id", + "group_id": "", + "group_instance_id": "", + "group_member_id": "", + "api_versions": { + "18": 4, + "22": 3, + "3": 12, + "24": 3, + "0": 7 + }, + "idle_duration": "0s", + "in_flight_requests": { + "sampled_in_flight_requests": [ + { + "api_key": 0, + "in_flight_duration": "0.000406892s" + } + ], + "has_more_requests": false + }, + "total_request_statistics": { + "produce_bytes": "78927173", + "fetch_bytes": "0", + "request_count": "4853", + "produce_batch_count": "4849" + }, + "recent_request_statistics": { + "produce_bytes": "78927173", + "fetch_bytes": "0", + "request_count": "4853", + "produce_batch_count": "4849" + } + }, + ... + ], + "total_size": "9" +} +---- +==== +-- +endif::[] ====== To view connections for a specific client, you can use a filter expression: @@ -179,7 +269,7 @@ curl -s -X POST \ .Show example API response [%collapsible] ==== -[,json,lines=24] +[,json,lines=23] ---- { "connections": [ diff --git a/modules/manage/partials/monitor-health.adoc b/modules/manage/partials/monitor-health.adoc index a0680e6c7c..f99081ec7a 100644 --- a/modules/manage/partials/monitor-health.adoc +++ b/modules/manage/partials/monitor-health.adoc @@ -161,6 +161,7 @@ b20601a3-624c-4a8c-ab88-717643f01d56 OPEN UNAUTHENTICATED perf-producer-clie ---- -- +ifndef::env-cloud[] curl:: + -- @@ -238,6 +239,7 @@ curl -s -X POST "localhost:9644/redpanda.core.admin.v2.ClusterService/ListKafkaC ---- ==== -- +endif::[] ifdef::env-cloud[] Data Plane API:: diff --git a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc index 09c408317e..89b0665f8c 100644 --- a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc +++ b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc @@ -6,7 +6,7 @@ This command displays a table of active and recently closed connections within t Use filtering and sorting to identify the connections of the client applications that you are interested in. See `--help` for the list of filtering arguments and sorting arguments. -In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections endpoint]: +In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections endpoint]. By default only a subset of the per-connection data is printed. To see all of the available data, use `--format=json`. From 22ea003cf9b7dd48627d5f1369f5b227cc2686d1 Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 21:27:45 -0800 Subject: [PATCH 05/13] Add single source tag for rpk cluster connections --- .../pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc | 5 ++++- .../pages/rpk/rpk-cluster/rpk-cluster-connections.adoc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc index 89b0665f8c..f1f95499c3 100644 --- a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc +++ b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc @@ -1,5 +1,6 @@ = rpk cluster connections list +// tag::single-source[] Display statistics about current Kafka connections. This command displays a table of active and recently closed connections within the cluster. @@ -93,4 +94,6 @@ rpk cluster connections list --format=json --state="OPEN" |--profile |string |Profile to use. See xref:reference:rpk/rpk-profile.adoc[`rpk profile`] for more details. |-v, --verbose |- |Enable verbose logging. -|=== \ No newline at end of file +|=== + +// end::single-source[] \ No newline at end of file diff --git a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections.adoc b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections.adoc index 33343e5ca7..dabb10806a 100644 --- a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections.adoc +++ b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections.adoc @@ -1,4 +1,5 @@ = rpk cluster connections +// tag::single-source[] Manage and monitor cluster connections. @@ -31,4 +32,6 @@ connections, connection |--profile |string |Profile to use. See xref:reference:rpk/rpk-profile.adoc[`rpk profile`] for more details. |-v, --verbose |- |Enable verbose logging. -|=== \ No newline at end of file +|=== + +// end::single-source[] \ No newline at end of file From b9e3c29c5dffd8d0393c4362926b41cd693142c8 Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 21:51:37 -0800 Subject: [PATCH 06/13] Missing Data Plane API response example --- .../manage-throughput.adoc | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index 99e9054d8c..8137743072 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -1,6 +1,7 @@ = Manage Throughput :description: Learn how to manage the throughput of Kafka traffic. :page-categories: Management, Networking + // tag::single-source[] ifdef::env-cloud[] :monitor-doc: manage:monitor-cloud.adoc#throughput @@ -253,6 +254,7 @@ b20601a3-624c-4a8c-ab88-717643f01d56 OPEN UNAUTHENTICATED perf-producer-clie ---- -- +ifndef::env-cloud[] curl:: + -- @@ -330,6 +332,87 @@ curl -s -X POST \ ---- ==== -- +endif::[] + +ifdef::env-cloud[] +Data Plane API:: ++ +-- +[,bash] +---- +curl \ + --request GET 'https:///v1/monitoring/kafka/connections' \ + --header "Authorization: Bearer $ACCESS_TOKEN" \ + --data '{ + "filter": "client_id = \"perf-producer-client\"" + }' +---- + +.Show example API response +[%collapsible] +==== +[,json,lines=23] +---- +{ + "connections": [ + { + "node_id": 0, + "shard_id": 0, + "uid": "b41584f3-2662-4185-a4b8-0d8510f5c780", + "state": "KAFKA_CONNECTION_STATE_OPEN", + "open_time": "2025-10-15T14:15:15.219538000Z", + "close_time": "1970-01-01T00:00:00.000000000Z", + "authentication_info": { + "state": "AUTHENTICATION_STATE_UNAUTHENTICATED", + "mechanism": "AUTHENTICATION_MECHANISM_UNSPECIFIED", + "user_principal": "" + }, + "listener_name": "", + "tls_info": { + "enabled": false + }, + "source": { + "ip_address": "127.0.0.1", + "port": 55002 + }, + "client_id": "perf-producer-client", + "client_software_name": "apache-kafka-java", + "client_software_version": "3.9.0", + "transactional_id": "", + "group_id": "", + "group_instance_id": "", + "group_member_id": "", + "api_versions": { + "18": 4, + "3": 12, + "10": 4 + }, + "idle_duration": "7.743592270s", + "in_flight_requests": { + "sampled_in_flight_requests": [], + "has_more_requests": false + }, + "total_request_statistics": { + "produce_bytes": "0", + "fetch_bytes": "0", + "request_count": "3", + "produce_batch_count": "0" + }, + "recent_request_statistics": { + "produce_bytes": "0", + "fetch_bytes": "0", + "request_count": "3", + "produce_batch_count": "0" + } + }, + ... + ], + "total_size": "2" +} +---- +==== +-- +endif::[] ====== From 9eaf8c2122779806a43f81c3996928de31cec01b Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 22:05:09 -0800 Subject: [PATCH 07/13] Conditionalize link for Cloud --- .../pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc index f1f95499c3..922a3147ab 100644 --- a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc +++ b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc @@ -7,7 +7,13 @@ This command displays a table of active and recently closed connections within t Use filtering and sorting to identify the connections of the client applications that you are interested in. See `--help` for the list of filtering arguments and sorting arguments. +ifndef::env-cloud[] In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections endpoint]. +endif::[] + +ifdef::env-cloud[] +In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[`GET /v1/monitoring/kafka/connections`] Data Plane API endpoint. +endif::[] By default only a subset of the per-connection data is printed. To see all of the available data, use `--format=json`. From fc9caa536469af39152e0e89dbbacbdcf63abb41 Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 22:05:29 -0800 Subject: [PATCH 08/13] Try passthrough to fix link formatting --- modules/manage/pages/cluster-maintenance/manage-throughput.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index 8137743072..525a143309 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -28,7 +28,7 @@ endif::[] You may find it helpful to check the xref:{monitor-doc}[current produce and consume throughput] of a client before you configure throughput quotas. -Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the {connected-clients-api-doc} to view detailed information about active Kafka client connections. +Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the pass:q,a[{connected-clients-api-doc}] to view detailed information about active Kafka client connections. For example, to view a cluster's connected clients in order of highest current produce throughput, run: From fd21893f005ed334df52fe4c7e632c467fd8ddf8 Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 22:08:21 -0800 Subject: [PATCH 09/13] Try different passthrough syntax --- modules/manage/pages/cluster-maintenance/manage-throughput.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index 525a143309..b4ecd0726c 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -28,7 +28,7 @@ endif::[] You may find it helpful to check the xref:{monitor-doc}[current produce and consume throughput] of a client before you configure throughput quotas. -Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the pass:q,a[{connected-clients-api-doc}] to view detailed information about active Kafka client connections. +Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the pass:a[{connected-clients-api-doc}] to view detailed information about active Kafka client connections. For example, to view a cluster's connected clients in order of highest current produce throughput, run: From 5de1e1501a8558c34ea46b3ae509f21628ba94ed Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 22:11:41 -0800 Subject: [PATCH 10/13] Don't use formatting --- .../manage/pages/cluster-maintenance/manage-throughput.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index b4ecd0726c..148f62aa2a 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -5,7 +5,7 @@ // tag::single-source[] ifdef::env-cloud[] :monitor-doc: manage:monitor-cloud.adoc#throughput -:connected-clients-api-doc: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[`GET /v1/monitoring/kafka/connections`] Data Plane API endpoint +:connected-clients-api-doc: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[GET /v1/monitoring/kafka/connections] Data Plane API endpoint endif::[] ifndef::env-cloud[] :monitor-doc: manage:monitoring.adoc#throughput @@ -28,7 +28,7 @@ endif::[] You may find it helpful to check the xref:{monitor-doc}[current produce and consume throughput] of a client before you configure throughput quotas. -Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the pass:a[{connected-clients-api-doc}] to view detailed information about active Kafka client connections. +Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the {connected-clients-api-doc} to view detailed information about active Kafka client connections. For example, to view a cluster's connected clients in order of highest current produce throughput, run: From 331f0ceb17ca623ef3019462c69970d1a0c9cb7d Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Tue, 18 Nov 2025 22:19:53 -0800 Subject: [PATCH 11/13] Use attributes for links only --- .../pages/cluster-maintenance/manage-throughput.adoc | 12 +++++++++--- modules/manage/partials/monitor-health.adoc | 12 ++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index 148f62aa2a..c22768b794 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -5,11 +5,11 @@ // tag::single-source[] ifdef::env-cloud[] :monitor-doc: manage:monitor-cloud.adoc#throughput -:connected-clients-api-doc: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[GET /v1/monitoring/kafka/connections] Data Plane API endpoint +:connected-clients-api-doc-ref: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections endif::[] ifndef::env-cloud[] :monitor-doc: manage:monitoring.adoc#throughput -:connected-clients-api-doc: link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections] Admin API endpoint +:connected-clients-api-doc-ref: link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections endif::[] Redpanda supports throughput throttling on both ingress and egress independently, and allows configuration at the broker and client levels. This helps prevent clients from causing unbounded network and disk usage on brokers. You can configure limits at two levels: @@ -28,7 +28,13 @@ endif::[] You may find it helpful to check the xref:{monitor-doc}[current produce and consume throughput] of a client before you configure throughput quotas. -Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the {connected-clients-api-doc} to view detailed information about active Kafka client connections. +ifndef::env-cloud[] +Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the {connected-clients-api-doc-ref}[ListKafkaConnections] Admin API endpoint to view detailed information about active Kafka client connections. +endif::[] + +ifdef::env-cloud[] +Use the xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] command or the {connected-clients-api-doc-ref}[`GET /v1/monitoring/kafka/connections`] Data Plane API endpoint to view detailed information about active Kafka client connections. +endif::[] For example, to view a cluster's connected clients in order of highest current produce throughput, run: diff --git a/modules/manage/partials/monitor-health.adoc b/modules/manage/partials/monitor-health.adoc index f99081ec7a..04a86b32ab 100644 --- a/modules/manage/partials/monitor-health.adoc +++ b/modules/manage/partials/monitor-health.adoc @@ -2,10 +2,10 @@ // tag::single-source[] ifndef::env-cloud[] -:connected-clients-api-doc: link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[Admin API reference] +:connected-clients-api-doc-ref: link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections endif::[] ifdef::env-cloud[] -:connected-clients-api-doc: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[Data Plane API reference] +:connected-clients-api-doc-ref: link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections endif::[] This section provides guidelines and example queries using Redpanda's public metrics to optimize your system's performance and monitor its health. @@ -136,10 +136,10 @@ rate(redpanda_rpc_sent_bytes{redpanda_server="kafka"}[$__rate_interval]) ==== Identify high-throughput clients ifndef::env-cloud[] -Use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the ListKafkaConnections endpoint in Admin API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +Use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the {connected-clients-api-doc-ref}[ListKafkaConnections] endpoint in Admin API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. endif::[] ifdef::env-cloud[] -Use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the `GET /v1/monitoring/kafka/connections` endpoint in the Data Plane API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. +Use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the {connected-clients-api-doc-ref}[`GET /v1/monitoring/kafka/connections`] endpoint in the Data Plane API to identify which client connections are driving the majority of, or the change in, the produce or consume throughput for a cluster. endif::[] For example, to list connections with a current produce throughput greater than 1MB, run: @@ -256,7 +256,7 @@ curl \ .Show example API response [%collapsible] ==== -[,bash,role=no-copy,lines=54] +[,bash,role=no-copy,lines=55] ---- { "connections": [ @@ -325,7 +325,7 @@ curl \ endif::[] ====== -You can adjust the filter and sorting criteria as necessary. See the {connected-clients-api-doc} for more details. +You can adjust the filter and sorting criteria as necessary. === Latency From 256c86c0bd16f7a2b9cc82d3dca089d07501e055 Mon Sep 17 00:00:00 2001 From: Kat Batuigas <36839689+kbatuigas@users.noreply.github.com> Date: Wed, 19 Nov 2025 10:00:10 -0800 Subject: [PATCH 12/13] Apply suggestions from code review Co-authored-by: Joyce Fee <102751339+Feediver1@users.noreply.github.com> --- .../pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc index 922a3147ab..2202afa68c 100644 --- a/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc +++ b/modules/reference/pages/rpk/rpk-cluster/rpk-cluster-connections-list.adoc @@ -8,11 +8,11 @@ This command displays a table of active and recently closed connections within t Use filtering and sorting to identify the connections of the client applications that you are interested in. See `--help` for the list of filtering arguments and sorting arguments. ifndef::env-cloud[] -In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections endpoint]. +In addition to filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/admin/v2/operation/operation-redpanda-core-admin-v2-clusterservice-listkafkaconnections[ListKafkaConnections endpoint]. endif::[] ifdef::env-cloud[] -In addition to the filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[`GET /v1/monitoring/kafka/connections`] Data Plane API endpoint. +In addition to filtering shorthand CLI arguments (For example, `--client-id`, `--state`), you can also use the `--filter-raw` and `--order-by` arguments that take string expressions. To understand the syntax of these arguments, refer to the Admin API docs of the filter and order-by fields of the link:/api/doc/cloud-dataplane/operation/operation-monitoringservice_listkafkaconnections[`GET /v1/monitoring/kafka/connections`] Data Plane API endpoint. endif::[] By default only a subset of the per-connection data is printed. To see all of the available data, use `--format=json`. From 8d9c842b07475220094b84b39af2e3f355eb7118 Mon Sep 17 00:00:00 2001 From: Kat Batuigas Date: Wed, 19 Nov 2025 10:20:41 -0800 Subject: [PATCH 13/13] Tweak line highlight --- .../cluster-maintenance/configure-client-connections.adoc | 2 +- .../manage/pages/cluster-maintenance/manage-throughput.adoc | 4 ++-- modules/manage/partials/monitor-health.adoc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc b/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc index af03310801..56a1482023 100644 --- a/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc +++ b/modules/manage/pages/cluster-maintenance/configure-client-connections.adoc @@ -32,7 +32,7 @@ ifndef::env-cloud[] Before you configure connection limits or reconnection settings, start by gathering detailed data about your client connections. * Internal metrics that follow the `vectorized_kafka_rpc_.\*connect*` naming pattern provide details on Kafka client connection activity. For example, xref:reference:internal-metrics-reference.adoc#vectorized_kafka_rpc_active_connections[`vectorized_kafka_rpc_active_connections`] reports the current number of active connections. -* For Redpanda v25.3 and later, use `rpk cluster connections list` or the Admin API ListKafkaConnections endpoint to identify: +* For Redpanda v25.3 and later, use xref:reference:rpk/rpk-cluster/rpk-cluster-connections-list.adoc[`rpk cluster connections list`] or the Admin API ListKafkaConnections endpoint to identify: + -- ** Which clients and applications are connected diff --git a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc index c22768b794..dab8e18374 100644 --- a/modules/manage/pages/cluster-maintenance/manage-throughput.adoc +++ b/modules/manage/pages/cluster-maintenance/manage-throughput.adoc @@ -81,7 +81,7 @@ curl -s -X POST \ .Show example API response [%collapsible] ==== -[,json,role=no-copy,lines=54] +[,json,role=no-copy,lines=55] ---- { "connections": [ @@ -277,7 +277,7 @@ curl -s -X POST \ .Show example API response [%collapsible] ==== -[,json,lines=23] +[,json,lines=24] ---- { "connections": [ diff --git a/modules/manage/partials/monitor-health.adoc b/modules/manage/partials/monitor-health.adoc index 04a86b32ab..d6bab19bf9 100644 --- a/modules/manage/partials/monitor-health.adoc +++ b/modules/manage/partials/monitor-health.adoc @@ -173,7 +173,7 @@ curl -s -X POST "localhost:9644/redpanda.core.admin.v2.ClusterService/ListKafkaC .Show example API response [%collapsible] ==== -[,bash,role=no-copy,lines=54] +[,bash,role=no-copy,lines=55] ---- { "connections": [ @@ -256,7 +256,7 @@ curl \ .Show example API response [%collapsible] ==== -[,bash,role=no-copy,lines=55] +[,bash,role=no-copy,lines=54] ---- { "connections": [