Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

High Kafka Broker Latency

Separate client-observed latency from broker queueing, local processing, replication wait, throttling, and response delivery.

Identify the request types, percentiles, brokers, listeners, client IDs, topics, partitions, and start time. Compare affected and healthy brokers under similar traffic.

Use Kafka request metrics and, for a bounded window, request logging:

PhaseLikely pressure
Request queueNetwork processors or request handlers saturated
Local timeCPU, disk, locks, serialization, metadata work
Remote timeReplica acknowledgement or delayed-operation wait
Throttle timeUser/client/IP/request quota
Response queue/sendNetwork processors, bandwidth, slow client
Terminal window
vmstat 1 10
iostat -xz 1 10
ss -s
jcmd <pid> GC.heap_info
jcmd <pid> Thread.print -l > kafka-thread-dump.txt

Check request-handler and network-thread idle ratios, disk await, page-cache pressure, CPU steal/throttling, GC pauses, direct memory, retransmits, connection churn, replica lag, and controller event-queue latency.

  • Produce latency plus under-replication: followers or disks cannot acknowledge promptly.
  • Fetch latency on a few partitions: hot leaders, remote tier fetches, or slow disks.
  • All requests slow on one broker: host, JVM, disk, or network saturation.
  • Administrative requests slow: controller/quorum or metadata pressure.
  • Latency equals quota delay: expected enforcement, not raw broker processing.

Remove the proven bottleneck: restore a failed disk/network path, rebalance hot leaders, correct quotas, reduce abusive clients, pause competing maintenance, or add capacity. Change thread counts and JVM settings only from measured saturation evidence.

Warning

Raising client timeouts hides symptoms and increases queued work. Do not run performance-test tools against a degraded production cluster without an approved load plan.

Confirm end-to-end client latency and broker phase metrics return to baseline at normal traffic, queues drain, ISR remains healthy, and the improvement persists after the temporary containment is removed.