<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Kafka Operations Guides on Netdata</title><link>https://www.netdata.cloud/guides/kafka/</link><description>Recent content in Kafka Operations Guides on Netdata</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://www.netdata.cloud/guides/kafka/index.xml" rel="self" type="application/rss+xml"/><item><title>How Kafka actually works in production: a mental model for operators</title><link>https://www.netdata.cloud/guides/kafka/how-kafka-works-in-production/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/how-kafka-works-in-production/</guid><description>&lt;h1 id="how-kafka-actually-works-in-production-a-mental-model-for-operators">How Kafka actually works in production: a mental model for operators&lt;/h1>
&lt;h2 id="what-it-is-and-why-it-matters">What it is and why it matters&lt;/h2>
&lt;p>Each broker is a concurrent system of subsystems sharing disk, network, page cache, and threads. Tail latency spikes and offline partitions usually stem from interactions between these subsystems, not single component failures.&lt;/p>
&lt;p>Underneath the distributed commit log abstraction, each broker runs a reactor-pattern server with three saturation layers: network threads, a bounded request queue, and I/O handler threads. Between I/O threads and the log sits a delayed-operation timer wheel called the purgatory. A separate controller maintains cluster metadata in a single-threaded event queue. Consumer groups are managed by a Group Coordinator that hashes group IDs to the &lt;code>__consumer_offsets&lt;/code> topic. Log data lives in segment files that rely on OS page cache and zero-copy sendfile. These subsystems compete for the same disk I/O, network bandwidth, file descriptors, and cache. Treating them as independent pipelines leads to unnecessary restarts and missed bottlenecks.&lt;/p></description></item><item><title>Kafka __consumer_offsets growing huge: compaction failure on the offsets topic</title><link>https://www.netdata.cloud/guides/kafka/kafka-consumer-offsets-topic-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-consumer-offsets-topic-growing/</guid><description>&lt;h1 id="kafka-__consumer_offsets-growing-huge-compaction-failure-on-the-offsets-topic">Kafka __consumer_offsets growing huge: compaction failure on the offsets topic&lt;/h1>
&lt;p>One broker&amp;rsquo;s disk is climbing faster than its peers, or &lt;code>__consumer_offsets&lt;/code> has grown to multiple gigabytes while producer traffic is flat. This internal topic is compacted by default; its size should stay roughly proportional to active consumer groups and partitions. Unbounded growth means the log cleaner has stalled or crashed. The failure is silent: producers and consumers keep working, but every offset commit appends a record that compaction will never remove. Growth is not evenly distributed: &lt;code>__consumer_offsets&lt;/code> is partitioned by &lt;code>group.id&lt;/code> hash, so a stalled cleaner on one broker affects only the partitions in that broker&amp;rsquo;s &lt;code>log.dirs&lt;/code>. Eventually the log directory fills, and the broker may mark it offline.&lt;/p></description></item><item><title>Kafka 'Broker may not be available': clients that can't connect or stay connected</title><link>https://www.netdata.cloud/guides/kafka/kafka-broker-may-not-be-available/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-broker-may-not-be-available/</guid><description>&lt;h1 id="kafka-broker-may-not-be-available-clients-that-cant-connect-or-stay-connected">Kafka &amp;lsquo;Broker may not be available&amp;rsquo;: clients that can&amp;rsquo;t connect or stay connected&lt;/h1>
&lt;p>Client logs show a warning like this:&lt;/p>
&lt;pre tabindex="0">&lt;code>WARN [Producer clientId=...] Connection to node -1 could not be established. Broker may not be available.
&lt;/code>&lt;/pre>&lt;p>Python clients may raise &lt;code>kafka.errors.NoBrokersAvailable&lt;/code>, while librdkafka-based clients report &lt;code>Connection refused&lt;/code> against the broker address. The bootstrap server is often reachable; ping and telnet succeed, yet the client still fails. This happens because Kafka clients use the bootstrap connection only to fetch metadata. After that, they disconnect and try to open fresh TCP connections to the host:port pairs advertised in the metadata response. If those endpoints are unreachable, misconfigured, or secured differently than the client expects, the connection fails even though the bootstrap succeeded.&lt;/p></description></item><item><title>Kafka ActiveControllerCount not equal to 1: no controller or split brain</title><link>https://www.netdata.cloud/guides/kafka/kafka-no-active-controller/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-no-active-controller/</guid><description>&lt;h1 id="kafka-activecontrollercount-not-equal-to-1-no-controller-or-split-brain">Kafka ActiveControllerCount not equal to 1: no controller or split brain&lt;/h1>
&lt;p>When the cluster-wide sum of &lt;code>kafka.controller:type=KafkaController,name=ActiveControllerCount&lt;/code> is not 1, the cluster has either no active controller or multiple active controllers. A sum of 0 means no broker is steering metadata. A sum greater than 1 means split brain. Either way, this is a control-plane failure. Existing partition leaders usually keep serving produce and fetch requests, so the data plane may look healthy at first. Any broker failure, partition reassignment, or topic operation will stall because there is no controller to process it, or multiple controllers are processing conflicting operations.&lt;/p></description></item><item><title>Kafka authentication failures: SASL/mTLS errors, credential rotation, and brute force</title><link>https://www.netdata.cloud/guides/kafka/kafka-authentication-failures/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-authentication-failures/</guid><description>&lt;h1 id="kafka-authentication-failures-saslmtls-errors-credential-rotation-and-brute-force">Kafka authentication failures: SASL/mTLS errors, credential rotation, and brute force&lt;/h1>
&lt;p>&lt;code>AuthenticationException&lt;/code> lines in broker logs are spiking and &lt;code>failed-authentication-total&lt;/code> is climbing on one or more listeners. Producers or consumers are failing to connect, and every failed attempt consumes a network thread and a file descriptor before the broker closes the connection. The same metric pattern can mean routine credential rotation, a client misconfiguration, or an active brute-force attempt. Telling the difference determines whether you need a config fix, a secret rotation, or a security incident response.&lt;/p></description></item><item><title>Kafka authorization failures: ACL denials, wrong-topic clients, and audit trails</title><link>https://www.netdata.cloud/guides/kafka/kafka-authorization-acl-denials/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-authorization-acl-denials/</guid><description>&lt;h1 id="kafka-authorization-failures-acl-denials-wrong-topic-clients-and-audit-trails">Kafka authorization failures: ACL denials, wrong-topic clients, and audit trails&lt;/h1>
&lt;p>Your consumers or producers throw &lt;code>TOPIC_AUTHORIZATION_FAILED&lt;/code> or &lt;code>CLUSTER_AUTHORIZATION_FAILED&lt;/code>. Your security team spots repeated log lines in the broker logs. You need to know within minutes whether this is a deployment misconfiguration, a client pointing at the wrong topic, or a security incident.&lt;/p>
&lt;p>In clusters where &lt;code>authorizer.class.name&lt;/code> is configured, Kafka writes authorization decisions to &lt;code>kafka-authorizer.log&lt;/code>. Denials log at INFO level; allowed operations are silent unless you enable DEBUG logging for the authorizer.&lt;/p></description></item><item><title>Kafka broker out of disk: log.dirs full, the cliff-edge shutdown, and recovery</title><link>https://www.netdata.cloud/guides/kafka/kafka-broker-out-of-disk/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-broker-out-of-disk/</guid><description>&lt;h1 id="kafka-broker-out-of-disk-logdirs-full-the-cliff-edge-shutdown-and-recovery">Kafka broker out of disk: log.dirs full, the cliff-edge shutdown, and recovery&lt;/h1>
&lt;p>When a Kafka broker exhausts disk space on a log directory, it does not throttle. It marks that directory offline or crashes entirely. Partitions on the failed directory become unavailable immediately. If all &lt;code>log.dirs&lt;/code> fail, the broker exits. You may see under-replicated partitions or producer timeouts seconds before failure, but often the first sign is a hard process exit with &lt;code>No space left on device&lt;/code>.&lt;/p></description></item><item><title>Kafka CommitFailedException: rebalanced-out consumers and poll loop timeouts</title><link>https://www.netdata.cloud/guides/kafka/kafka-commit-failed-exception/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-commit-failed-exception/</guid><description>&lt;h1 id="kafka-commitfailedexception-rebalanced-out-consumers-and-poll-loop-timeouts">Kafka CommitFailedException: rebalanced-out consumers and poll loop timeouts&lt;/h1>
&lt;p>&lt;code>CommitFailedException&lt;/code> with the message that the group has already rebalanced and assigned the partitions to another member means the time between &lt;code>poll()&lt;/code> calls exceeded &lt;code>max.poll.interval.ms&lt;/code>. The coordinator evicted the consumer and rejected the in-flight offset commit.&lt;/p>
&lt;p>When one consumer is evicted, the group rebalances. If other consumers are also slow, or if the rebalance itself takes long enough that healthy consumers miss the same deadline, the group enters a rebalance storm: it oscillates between &lt;code>JoinGroup&lt;/code> and &lt;code>SyncGroup&lt;/code> without stabilizing, and lag grows without bound.&lt;/p></description></item><item><title>Kafka connection storms: connection-count spikes, FD pressure, and network threads</title><link>https://www.netdata.cloud/guides/kafka/kafka-connection-count-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-connection-count-storm/</guid><description>&lt;h1 id="kafka-connection-storms-connection-count-spikes-fd-pressure-and-network-threads">Kafka connection storms: connection-count spikes, FD pressure, and network threads&lt;/h1>
&lt;p>Connection-count jumps on one or more brokers. An alert fires for open file descriptors, or consumers report timeouts while broker logs show nothing dramatic. In Kafka, a connection storm is insidious: every TCP connection costs one file descriptor and network-thread time, and the reactor architecture means network-thread saturation blocks everything, including metadata requests.&lt;/p>
&lt;p>Incremental fetch sessions keep consumer connections open even when idle. This is normal, but it means brokers run with a high steady-state connection count. The danger is the rate of change, not the absolute number. When connections spike above twice the established baseline, network threads drop below 30% idle, and FD usage approaches the process limit, the broker is in a connection storm.&lt;/p></description></item><item><title>Kafka consumer group lag growing: detection, lag-as-time, and root causes</title><link>https://www.netdata.cloud/guides/kafka/kafka-consumer-group-lag-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-consumer-group-lag-growing/</guid><description>&lt;h1 id="kafka-consumer-group-lag-growing-detection-lag-as-time-and-root-causes">Kafka consumer group lag growing: detection, lag-as-time, and root causes&lt;/h1>
&lt;p>When a consumer group falls behind, lag climbs monotonically. If the committed offset crosses the retention boundary, consumers hit &lt;code>OffsetOutOfRangeException&lt;/code> and must reset to earliest or latest, reprocessing or skipping data. Restarting the consumer is a common first reaction, but broker-side fetch latency, page cache eviction, and network saturation are equally common culprits. Detect lag accurately, convert it to time, and trace the root cause without guessing.&lt;/p></description></item><item><title>Kafka consumer group rebalancing too often: heartbeats, session timeout, and assignors</title><link>https://www.netdata.cloud/guides/kafka/kafka-consumer-group-rebalancing-frequently/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-consumer-group-rebalancing-frequently/</guid><description>&lt;h1 id="kafka-consumer-group-rebalancing-too-often-heartbeats-session-timeout-and-assignors">Kafka consumer group rebalancing too often: heartbeats, session timeout, and assignors&lt;/h1>
&lt;p>Consumer group lag is growing, application logs are full of &lt;code>JoinGroup&lt;/code> and &lt;code>SyncGroup&lt;/code> messages, and &lt;code>kafka-consumer-groups.sh&lt;/code> shows the group flipping between &lt;code>Stable&lt;/code> and &lt;code>PreparingRebalance&lt;/code>. Healthy groups rebalance only during membership changes and planned deployments. More than two or three rebalances per hour for a stable group signals instability. The usual cause is a mismatch between processing latency and one of three timeouts: &lt;code>session.timeout.ms&lt;/code>, &lt;code>heartbeat.interval.ms&lt;/code>, or &lt;code>max.poll.interval.ms&lt;/code>. The assignor strategy and static membership configuration determine how painful each rebalance is.&lt;/p></description></item><item><title>Kafka consumer group stuck Empty or Dead: no members consuming</title><link>https://www.netdata.cloud/guides/kafka/kafka-consumer-group-empty-stuck/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-consumer-group-empty-stuck/</guid><description>&lt;h1 id="kafka-consumer-group-stuck-empty-or-dead-no-members-consuming">Kafka consumer group stuck Empty or Dead: no members consuming&lt;/h1>
&lt;p>A consumer group that should be active shows &lt;code>Empty&lt;/code> or &lt;code>Dead&lt;/code> state with no members. For a real-time pipeline, every new message piles up unread. For a batch job, &lt;code>Empty&lt;/code> between runs is expected. The difference between an intentional idle state and a silent outage is simple: is lag growing, and was the group supposed to be active?&lt;/p>
&lt;p>An &lt;code>Empty&lt;/code> group still exists in the coordinator. Committed offsets are retained until they expire, so consumers can resume on restart. A &lt;code>Dead&lt;/code> group has been removed, usually because offsets expired while no members were active. If the group is &lt;code>Dead&lt;/code> and data is still being produced, new consumers join a fresh group state and default to &lt;code>auto.offset.reset&lt;/code>, which can skip or reprocess data.&lt;/p></description></item><item><title>Kafka consumer rebalance storm: stuck in PreparingRebalance and max.poll.interval.ms</title><link>https://www.netdata.cloud/guides/kafka/kafka-consumer-rebalance-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-consumer-rebalance-storm/</guid><description>&lt;h1 id="kafka-consumer-rebalance-storm-stuck-in-preparingrebalance-and-maxpollintervalms">Kafka consumer rebalance storm: stuck in PreparingRebalance and max.poll.interval.ms&lt;/h1>
&lt;p>Consumer group lag climbs while brokers report zero under-replicated partitions, normal produce and fetch latency, and normal request handler idle percent. The consumer group oscillates between Stable, PreparingRebalance, and CompletingRebalance without settling long enough to make progress. Every rebalance cycle pauses consumption; lag grows because time spent rebalancing dwarfs time spent fetching. This is a consumer rebalance storm. It is almost always a client-side timeout or processing issue. Look for CommitFailedException or max.poll.interval.ms exceeded in consumer logs.&lt;/p></description></item><item><title>Kafka controller event queue backing up: overwhelmed controller and stalled metadata</title><link>https://www.netdata.cloud/guides/kafka/kafka-controller-event-queue-backup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-controller-event-queue-backup/</guid><description>&lt;h1 id="kafka-controller-event-queue-backing-up-overwhelmed-controller-and-stalled-metadata">Kafka controller event queue backing up: overwhelmed controller and stalled metadata&lt;/h1>
&lt;p>You see &lt;code>NOT_LEADER_FOR_PARTITION&lt;/code> errors spike in client logs. Leader elections stop completing. The active controller&amp;rsquo;s event queue grows and does not drain. Partitions that need new leaders stay offline. The single thread processing partition state changes cannot keep up, and metadata operations stall.&lt;/p>
&lt;p>In ZooKeeper mode, each event writes to ZooKeeper. In KRaft mode, each event appends to the Raft metadata log. The active controller processes them sequentially. When the queue backs up, the control plane slows. The data plane may continue serving existing leaders, but any failure requiring a state change gets stuck.&lt;/p></description></item><item><title>Kafka disk I/O latency high: await, LocalTimeMs, and the slow-disk broker</title><link>https://www.netdata.cloud/guides/kafka/kafka-disk-io-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-disk-io-latency-high/</guid><description>&lt;h1 id="kafka-disk-io-latency-high-await-localtimems-and-the-slow-disk-broker">Kafka disk I/O latency high: await, LocalTimeMs, and the slow-disk broker&lt;/h1>
&lt;p>&lt;code>iostat&lt;/code> shows &lt;code>await&lt;/code> climbing, maybe a disk alert fired. But &lt;code>await&lt;/code> alone is not a pageable event. On SSDs and RAID arrays, &lt;code>%util&lt;/code> hits 100% under modest load because it measures device busy time, not saturation. What matters is &lt;code>await&lt;/code>, the average time for I/O requests to be served. At the Kafka layer, the mirror image is &lt;code>LocalTimeMs&lt;/code> in the request latency breakdown. Both spike during normal operations &amp;ndash; broker restart with cold page cache, log compaction, and partition reassignment all drive up disk latency without indicating hardware fault. This guide shows how to distinguish a transient spike from a slow disk that will shrink your ISR and block produce requests.&lt;/p></description></item><item><title>Kafka disk space planning: retention, replication, and runway estimation</title><link>https://www.netdata.cloud/guides/kafka/kafka-disk-space-runway-planning/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-disk-space-runway-planning/</guid><description>&lt;h1 id="kafka-disk-space-planning-retention-replication-and-runway-estimation">Kafka disk space planning: retention, replication, and runway estimation&lt;/h1>
&lt;p>When a Kafka broker exhausts a &lt;code>log.dirs&lt;/code> volume, the directory goes offline. If it is the only volume, the broker halts. Partitions on that volume become unavailable and the broker cannot rejoin until space is freed. Disk planning is a continuous operational calculation, not a one-time purchase. You need a working estimate of steady-state usage, a runway model against an operational full threshold, and an explicit map of the retention rules that actually delete data.&lt;/p></description></item><item><title>Kafka enable.auto.commit data loss: committed offsets that outrun processing</title><link>https://www.netdata.cloud/guides/kafka/kafka-auto-commit-silent-data-loss/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-auto-commit-silent-data-loss/</guid><description>&lt;h1 id="kafka-enableautocommit-data-loss-committed-offsets-that-outrun-processing">Kafka enable.auto.commit data loss: committed offsets that outrun processing&lt;/h1>
&lt;p>Downstream systems are missing events, but your Kafka consumer group reports lag near zero and the group state is Stable. There are no broker errors, no rebalances, and no visible backpressure. The application crashed or deployed minutes ago, then caught up instantly on recovery. Messages are lost silently. This is the signature of &lt;code>enable.auto.commit=true&lt;/code>: offsets are committed to &lt;code>__consumer_offsets&lt;/code> on a fixed schedule, not after processing completes.&lt;/p></description></item><item><title>Kafka FailedProduceRequestsPerSec rising: the single best 'producers are hurting' signal</title><link>https://www.netdata.cloud/guides/kafka/kafka-failed-produce-requests/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-failed-produce-requests/</guid><description>&lt;h1 id="kafka-failedproducerequestspersec-rising-the-single-best-producers-are-hurting-signal">Kafka FailedProduceRequestsPerSec rising: the single best &amp;lsquo;producers are hurting&amp;rsquo; signal&lt;/h1>
&lt;p>&lt;code>FailedProduceRequestsPerSec&lt;/code> rising is broker-side confirmation that producers are actively being rejected. Unlike client-side timeouts from network blips or producer memory pressure, it only increments when the broker receives a produce request and fails to complete it. The MBean &lt;code>kafka.server:type=BrokerTopicMetrics,name=FailedProduceRequestsPerSec&lt;/code> rolls up server-side produce failures into a single rate: &lt;code>NotEnoughReplicasException&lt;/code>, &lt;code>NotLeaderOrFollowerException&lt;/code>, &lt;code>CorruptRecordException&lt;/code>, and others. A sustained nonzero rate means data is not being accepted, and the window for data loss or unavailability is open.&lt;/p></description></item><item><title>Kafka fetch request latency high: FetchConsumer vs FetchFollower and page cache misses</title><link>https://www.netdata.cloud/guides/kafka/kafka-fetch-request-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-fetch-request-latency-high/</guid><description>&lt;h1 id="kafka-fetch-request-latency-high-fetchconsumer-vs-fetchfollower-and-page-cache-misses">Kafka fetch request latency high: FetchConsumer vs FetchFollower and page cache misses&lt;/h1>
&lt;p>Your tail consumers are lagging, or your under-replicated partition count is climbing. On the broker, &lt;code>kafka.network:type=RequestMetrics,name=TotalTimeMs,request=FetchConsumer&lt;/code> or &lt;code>FetchFollower&lt;/code> is elevated. Raw fetch latency is a poor signal: consumer long-polling means &lt;code>TotalTimeMs&lt;/code> routinely includes the full &lt;code>fetch.max.wait.ms&lt;/code> wait even on an idle topic, and follower fetches are paced by the leader&amp;rsquo;s ability to serve segments. The actionable metric is &lt;code>LocalTimeMs&lt;/code>, the time the leader spends reading the log. When &lt;code>FetchConsumer&lt;/code> &lt;code>LocalTimeMs&lt;/code> spikes, the data was not in the OS page cache. When &lt;code>FetchFollower&lt;/code> &lt;code>LocalTimeMs&lt;/code> spikes, the leader is slow to serve replication reads and ISR shrinks will follow. The sections below show how to tell the two apart, confirm page cache misses, and fix the root cause.&lt;/p></description></item><item><title>Kafka ISR shrinking: IsrShrinksPerSec, flapping, and the cascade to offline</title><link>https://www.netdata.cloud/guides/kafka/kafka-isr-shrink-storm/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-isr-shrink-storm/</guid><description>&lt;h1 id="kafka-isr-shrinking-isrshrinkspersec-flapping-and-the-cascade-to-offline">Kafka ISR shrinking: IsrShrinksPerSec, flapping, and the cascade to offline&lt;/h1>
&lt;p>&lt;code>IsrShrinksPerSec&lt;/code> is climbing on your leaders and &lt;code>UnderReplicatedPartitions&lt;/code> is no longer zero. If it is flapping &amp;ndash; shrinks followed by expands every few minutes &amp;ndash; the path ends with &lt;code>OfflinePartitionsCount&lt;/code> rising and &lt;code>acks=all&lt;/code> producers throwing &lt;code>NotEnoughReplicasException&lt;/code>. This guide covers that path: how a lagging follower becomes a cluster-wide problem, how to separate flapping from one-way degradation, and how to stop the cascade before partitions go offline.&lt;/p></description></item><item><title>Kafka JVM heap and Full GC pauses: ISR drops, session timeouts, and right-sizing the heap</title><link>https://www.netdata.cloud/guides/kafka/kafka-jvm-heap-full-gc-pauses/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-jvm-heap-full-gc-pauses/</guid><description>&lt;h1 id="kafka-jvm-heap-and-full-gc-pauses-isr-drops-session-timeouts-and-right-sizing-the-heap">Kafka JVM heap and Full GC pauses: ISR drops, session timeouts, and right-sizing the heap&lt;/h1>
&lt;p>Sporadic &lt;code>UnderReplicatedPartitions&lt;/code> and ISR shrinks that do not correlate with disk I/O or network faults, combined with consumer rebalances and &lt;code>NotEnoughReplicasException&lt;/code> from producers using &lt;code>acks=all&lt;/code>, point to broker JVM heap pressure. Check broker logs for GC pauses in the Old Generation lasting several seconds.&lt;/p>
&lt;p>Brokers use the JVM heap for metadata, request buffers, and message format conversion. They do not store messages on the heap; the OS page cache handles that. When the heap is misconfigured or under pressure, garbage collection pauses can freeze a broker long enough to trigger ZooKeeper session expirations, follower lag, and cascading availability issues. Full GC pauses exceeding five seconds are the common threshold where these symptoms begin.&lt;/p></description></item><item><title>Kafka KRaft metadata log lag: standby controllers and brokers falling behind</title><link>https://www.netdata.cloud/guides/kafka/kafka-kraft-metadata-log-lag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-kraft-metadata-log-lag/</guid><description>&lt;h1 id="kafka-kraft-metadata-log-lag-standby-controllers-and-brokers-falling-behind">Kafka KRaft metadata log lag: standby controllers and brokers falling behind&lt;/h1>
&lt;p>When client errors like &lt;code>NOT_LEADER_FOR_PARTITION&lt;/code> or &lt;code>LeaderNotAvailableException&lt;/code> hit a stable-looking cluster, check whether standby controllers and broker metadata lag are climbing. In KRaft mode, the active controller is the Raft quorum leader. It appends metadata changes to &lt;code>__cluster_metadata&lt;/code>. Standby controllers and brokers apply that log asynchronously. When they fall behind, they act on stale partition leadership, outdated ISR memberships, and old broker registrations. This guide shows how to distinguish a slow follower, a sick leader, and a network partition.&lt;/p></description></item><item><title>Kafka KRaft quorum has no leader: current-leader = -1 and frozen metadata</title><link>https://www.netdata.cloud/guides/kafka/kafka-kraft-quorum-no-leader/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-kraft-quorum-no-leader/</guid><description>&lt;h1 id="kafka-kraft-quorum-has-no-leader-current-leader---1-and-frozen-metadata">Kafka KRaft quorum has no leader: current-leader = -1 and frozen metadata&lt;/h1>
&lt;p>Topic creation hangs. Partition reassignments stall. Broker logs show metadata operations timing out. On controller nodes, JMX reports &lt;code>kafka.server:type=raft-metrics,attribute=current-leader&lt;/code> with value &lt;code>-1&lt;/code>, and the quorum state is frozen. Existing producers and consumers continue to read and write, but the control plane is stuck.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>The quorum leader acts as the active controller. When &lt;code>current-leader&lt;/code> is &lt;code>-1&lt;/code>, the local controller has not discovered a leader, which means no node in the quorum can commit new entries to the metadata log. Topic creation, deletion, configuration updates, reassignments, and ISR changes are blocked. Leader elections for partitions that lose their broker also cannot proceed.&lt;/p></description></item><item><title>Kafka LEADER_NOT_AVAILABLE: causes during elections, restarts, and topic creation</title><link>https://www.netdata.cloud/guides/kafka/kafka-leader-not-available/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-leader-not-available/</guid><description>&lt;h1 id="kafka-leader_not_available-causes-during-elections-restarts-and-topic-creation">Kafka LEADER_NOT_AVAILABLE: causes during elections, restarts, and topic creation&lt;/h1>
&lt;p>&lt;code>LEADER_NOT_AVAILABLE&lt;/code> means a client asked a broker to produce or fetch from a partition that has no assigned leader. In healthy clusters this is brief during rolling restarts, controller elections, or topic creation. Persistent errors correlate with &lt;code>OfflinePartitionsCount &amp;gt; 0&lt;/code> and indicate the data plane is broken for those partitions. Distinguish this from &lt;code>NOT_LEADER_FOR_PARTITION&lt;/code>, which means a leader exists but the client contacted the wrong broker and needs a metadata refresh.&lt;/p></description></item><item><title>Kafka LeaderElectionRateAndTimeMs spiking: election storms and slow elections</title><link>https://www.netdata.cloud/guides/kafka/kafka-leader-election-rate-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-leader-election-rate-high/</guid><description>&lt;h1 id="kafka-leaderelectionrateandtimems-spiking-election-storms-and-slow-elections">Kafka LeaderElectionRateAndTimeMs spiking: election storms and slow elections&lt;/h1>
&lt;p>&lt;code>LeaderElectionRateAndTimeMs&lt;/code> climbing outside maintenance windows means the controller is struggling to keep the partition map consistent. Producers and consumers may see &lt;code>NOT_LEADER_FOR_PARTITION&lt;/code> or request timeouts. Partitions can hang under-replicated or offline while the controller works through a backlog.&lt;/p>
&lt;p>This metric has two dimensions. The rate is how often leadership changes. The time is how long the metadata store takes to commit each change. High rate with low time means broker flapping or repeated administrative actions. Normal rate with high time means the controller event queue is backed up, ZooKeeper writes are slow, or the KRaft quorum is lagging. Determine which mode you are in before the cluster degrades further.&lt;/p></description></item><item><title>Kafka leadership imbalance: LeaderCount skew and preferred replica election</title><link>https://www.netdata.cloud/guides/kafka/kafka-leadership-imbalance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-leadership-imbalance/</guid><description>&lt;h1 id="kafka-leadership-imbalance-leadercount-skew-and-preferred-replica-election">Kafka leadership imbalance: LeaderCount skew and preferred replica election&lt;/h1>
&lt;p>One broker in your cluster is handling 40 percent of all produce requests. Its &lt;code>RequestHandlerAvgIdlePercent&lt;/code> is dropping toward 0.3 while the rest of the cluster is nearly idle. Cluster-level throughput dashboards look healthy because aggregate ingress is within capacity, but tail latency on the hot broker is climbing and consumers connected to it are falling behind. The root cause is leadership skew: a disproportionate number of partition leaders have landed on one broker, and every leader carries the full request load for its partitions. This happens silently after rolling restarts, controlled shutdowns, or broker decommissions. Even a perfectly even &lt;code>PartitionCount&lt;/code> across brokers can hide severe leadership imbalance. You will not see it without monitoring &lt;code>LeaderCount&lt;/code> per broker.&lt;/p></description></item><item><title>Kafka log compaction falling behind: the dead cleaner thread and unbounded disk growth</title><link>https://www.netdata.cloud/guides/kafka/kafka-log-compaction-falling-behind/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-log-compaction-falling-behind/</guid><description>&lt;h1 id="kafka-log-compaction-falling-behind-the-dead-cleaner-thread-and-unbounded-disk-growth">Kafka log compaction falling behind: the dead cleaner thread and unbounded disk growth&lt;/h1>
&lt;p>Disk utilization climbs steadily on one or more brokers while producer traffic stays flat. &lt;code>__consumer_offsets&lt;/code> balloons from a few gigabytes to hundreds. Under-replicated partitions are at zero, producers show no errors, and standard Kafka alerts are silent. The usual culprit is a dead log cleaner thread: it hit a corrupt record or an OOM during compaction, crashed, and never restarted. Every compacted topic now accumulates records without bound.&lt;/p></description></item><item><title>Kafka Log directory failed / OfflineLogDirectoryCount > 0: disk errors and JBOD recovery</title><link>https://www.netdata.cloud/guides/kafka/kafka-log-directory-failed-offline/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-log-directory-failed-offline/</guid><description>&lt;h1 id="kafka-log-directory-failed--offlinelogdirectorycount--0-disk-errors-and-jbod-recovery">Kafka Log directory failed / OfflineLogDirectoryCount &amp;gt; 0: disk errors and JBOD recovery&lt;/h1>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>When Kafka catches an IOException on a &lt;code>log.dirs&lt;/code> path, it marks that log directory offline. The broker increments &lt;code>kafka.log:type=LogManager,name=OfflineLogDirectoryCount&lt;/code> and logs the failure. Partitions with replicas on the failed directory lose those replicas. If the partition leader was on that directory and &lt;code>unclean.leader.election.enable=false&lt;/code>, the partition becomes unavailable until the controller elects a new leader from the remaining ISR. Producers with &lt;code>acks=all&lt;/code> see &lt;code>NotEnoughReplicasException&lt;/code> when the surviving ISR drops below &lt;code>min.insync.replicas&lt;/code>.&lt;/p></description></item><item><title>Kafka LogFlushRateAndTimeMs high: fsync latency and a failing disk</title><link>https://www.netdata.cloud/guides/kafka/kafka-log-flush-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-log-flush-latency-high/</guid><description>&lt;h1 id="kafka-logflushrateandtimems-high-fsync-latency-and-a-failing-disk">Kafka LogFlushRateAndTimeMs high: fsync latency and a failing disk&lt;/h1>
&lt;p>When &lt;code>kafka.log:type=LogFlushStats,name=LogFlushRateAndTimeMs&lt;/code> p99 stays above 200 ms, the broker&amp;rsquo;s fsync path is slow. On SSD-backed clusters, p99 should stay below 50 ms; sustained values above 2 s point to disk degradation. Because most deployments leave &lt;code>log.flush.interval.messages&lt;/code> and &lt;code>log.flush.interval.ms&lt;/code> unset and rely on replication plus OS lazy flush, this metric reflects kernel-driven flushes or explicit fsyncs. A slow flush raises produce &lt;code>LocalTimeMs&lt;/code>, blocks request handler threads, and can push followers out of ISR. This guide shows how to tell whether the cause is a failing disk, a bad flush policy, or transient I/O contention.&lt;/p></description></item><item><title>Kafka min.insync.replicas and acks: configuring durability you actually have</title><link>https://www.netdata.cloud/guides/kafka/kafka-min-insync-replicas-misconfigured/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-min-insync-replicas-misconfigured/</guid><description>&lt;h1 id="kafka-mininsyncreplicas-and-acks-configuring-durability-you-actually-have">Kafka min.insync.replicas and acks: configuring durability you actually have&lt;/h1>
&lt;p>Most operators set producers to &lt;code>acks=all&lt;/code> and assume the cluster acks only when every replica has the message. It does not. With &lt;code>acks=all&lt;/code>, the broker waits only for the current in-sync replica set (ISR). Because the ISR shrinks dynamically when followers lag, a partition with replication factor three can have an ISR of one &amp;ndash; the leader itself. Without raising &lt;code>min.insync.replicas&lt;/code> from its default, the leader acks with zero followers caught up. Your durability guarantee collapses to leader-only persistence, and you only find out when the leader dies and data is missing.&lt;/p></description></item><item><title>Kafka monitoring checklist: the signals every production cluster needs</title><link>https://www.netdata.cloud/guides/kafka/kafka-monitoring-checklist/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-monitoring-checklist/</guid><description>&lt;h1 id="kafka-monitoring-checklist-the-signals-every-production-cluster-needs">Kafka monitoring checklist: the signals every production cluster needs&lt;/h1>
&lt;p>Kafka failures follow predictable paths: an ISR shrinks, a controller queue backs up, a disk fills while the cleaner thread hangs, or a consumer rebalance storm hides behind healthy broker metrics. You need to know which signals matter and when they justify a 3 AM page.&lt;/p>
&lt;p>This checklist organizes broker-side signals into four levels. Each builds on the last: Level 1 prevents data loss. Level 2 prevents surprises. Level 3 exposes leading indicators. Level 4 catches silent killers. Use it to audit dashboards, tune alert severity, and justify instrumentation.&lt;/p></description></item><item><title>Kafka monitoring maturity model: from survival to expert</title><link>https://www.netdata.cloud/guides/kafka/kafka-monitoring-maturity-model/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-monitoring-maturity-model/</guid><description>&lt;h1 id="kafka-monitoring-maturity-model-from-survival-to-expert">Kafka monitoring maturity model: from survival to expert&lt;/h1>
&lt;p>Broker logs and a single health check are not enough for production Kafka. Monitoring everything at once creates noise and hides the signals that prevent outages. This model gives you a prioritized path: start with telemetry that prevents total data loss, then add layers that catch degradation before it becomes an incident.&lt;/p>
&lt;p>Use this as an onboarding checklist for new clusters, an incident reference, and a roadmap when you have instrumentation budget. Signals come from Kafka JMX, OS metrics, and admin APIs. In KRaft mode (mandatory in Kafka 4.0+), substitute ZooKeeper-specific signals with the corresponding Raft quorum metrics.&lt;/p></description></item><item><title>Kafka network egress saturation: BytesOutPerSec, replication amplification, and fan-out</title><link>https://www.netdata.cloud/guides/kafka/kafka-bytes-out-network-saturation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-bytes-out-network-saturation/</guid><description>&lt;h1 id="kafka-network-egress-saturation-bytesoutpersec-replication-amplification-and-fan-out">Kafka network egress saturation: BytesOutPerSec, replication amplification, and fan-out&lt;/h1>
&lt;p>Kafka is usually sized for producer ingress because that is what the business reports. In practice, the first resource to saturate is almost always network egress. Every byte written to a partition leader is read at least once by each follower replica and once by every active consumer group keeping up with the log. A broker can hit its NIC ceiling while producer throughput looks comfortable and disk I/O is barely warmed up.&lt;/p></description></item><item><title>Kafka NetworkProcessorAvgIdlePercent low: network thread saturation and TLS overhead</title><link>https://www.netdata.cloud/guides/kafka/kafka-network-processor-idle-percent-low/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-network-processor-idle-percent-low/</guid><description>&lt;h1 id="kafka-networkprocessoravgidlepercent-low-network-thread-saturation-and-tls-overhead">Kafka NetworkProcessorAvgIdlePercent low: network thread saturation and TLS overhead&lt;/h1>
&lt;p>NetworkProcessorAvgIdlePercent drops on one or more brokers. A ticket may fire when the value falls below 0.3, or producers and consumers may timeout while broker CPU looks fine and I/O threads are not obviously saturated. Network thread saturation blocks all socket activity, including metadata requests, so every client suffers. With the default num.network.threads set to 3, brokers running TLS and dense client pools are especially vulnerable. Sustained values below 0.1 make the broker effectively unreachable even though the process is still running.&lt;/p></description></item><item><title>Kafka NOT_LEADER_FOR_PARTITION: stale metadata, controller lag, and client retries</title><link>https://www.netdata.cloud/guides/kafka/kafka-not-leader-for-partition/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-not-leader-for-partition/</guid><description>&lt;h1 id="kafka-not_leader_for_partition-stale-metadata-controller-lag-and-client-retries">Kafka NOT_LEADER_FOR_PARTITION: stale metadata, controller lag, and client retries&lt;/h1>
&lt;p>Producers and consumers log &lt;code>NOT_LEADER_FOR_PARTITION&lt;/code>. Broker response metrics show spikes in failed produce or fetch requests. The cluster usually self-heals within seconds as clients refresh metadata. When the error persists for minutes, or flaps across many partitions, the root cause is typically a controller that cannot keep up with leadership changes. Distinguishing a routine leader election from a controller queue backup that blocks metadata propagation is the first step.&lt;/p></description></item><item><title>Kafka NotEnoughReplicasException: acks=all writes rejected below min.insync.replicas</title><link>https://www.netdata.cloud/guides/kafka/kafka-not-enough-replicas-exception/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-not-enough-replicas-exception/</guid><description>&lt;h1 id="kafka-notenoughreplicasexception-acksall-writes-rejected-below-mininsyncreplicas">Kafka NotEnoughReplicasException: acks=all writes rejected below min.insync.replicas&lt;/h1>
&lt;p>Producers are throwing &lt;code>org.apache.kafka.common.errors.NotEnoughReplicasException&lt;/code> or &lt;code>NotEnoughReplicasAfterAppendException&lt;/code>, and &lt;code>acks=all&lt;/code> writes are failing while &lt;code>acks=1&lt;/code> or &lt;code>acks=0&lt;/code> writes may still succeed. The affected partitions no longer have enough in-sync replicas to satisfy &lt;code>min.insync.replicas&lt;/code>. The immediate operational question is whether the ISR shrink is a transient recovery blip or a sustained degradation that will block writes until you fix the follower.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>The leader tracks followers caught up within &lt;code>replica.lag.time.max.ms&lt;/code> &lt;!-- TODO: verify default value and version --> in the In-Sync Replica set (ISR). For &lt;code>acks=all&lt;/code>, the leader waits for all current ISR members before acknowledging the producer. If the ISR size drops below &lt;code>min.insync.replicas&lt;/code>, the leader rejects the produce request. The broker-level default for &lt;code>min.insync.replicas&lt;/code> is 1, so a lone leader can acknowledge alone. In practice, with &lt;code>replication.factor=3&lt;/code> and &lt;code>acks=all&lt;/code>, set &lt;code>min.insync.replicas=2&lt;/code> so a single follower loss blocks writes instead of silently weakening durability.&lt;/p></description></item><item><title>Kafka OfflinePartitionsCount > 0: partitions with no leader and how to recover</title><link>https://www.netdata.cloud/guides/kafka/kafka-offline-partitions-count/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-offline-partitions-count/</guid><description>&lt;h1 id="kafka-offlinepartitionscount--0-partitions-with-no-leader-and-how-to-recover">Kafka OfflinePartitionsCount &amp;gt; 0: partitions with no leader and how to recover&lt;/h1>
&lt;p>When &lt;code>kafka.controller:type=KafkaController,name=OfflinePartitionsCount&lt;/code> is nonzero, at least one partition has no active leader. Those partitions are completely unavailable: producers receive errors, consumers stall, and no data is written or read until a leader is elected. This is a data-plane outage.&lt;/p>
&lt;p>This metric is only meaningful on the active controller. Non-controller brokers always report zero. If the controller itself is down, the metric may be stale or unreachable at the exact moment you need it. Brief spikes can occur during controller re-election or ungraceful broker shutdown, but any sustained nonzero value past 60 seconds is an active incident that requires immediate intervention.&lt;/p></description></item><item><title>Kafka OffsetOutOfRangeException: when retention deletes data before the consumer reads it</title><link>https://www.netdata.cloud/guides/kafka/kafka-offset-out-of-range-exception/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-offset-out-of-range-exception/</guid><description>&lt;h1 id="kafka-offsetoutofrangeexception-when-retention-deletes-data-before-the-consumer-reads-it">Kafka OffsetOutOfRangeException: when retention deletes data before the consumer reads it&lt;/h1>
&lt;p>&lt;code>OffsetOutOfRangeException&lt;/code> means the consumer requested an offset the broker no longer holds. The log segment containing the consumer&amp;rsquo;s committed position was deleted by retention before the consumer caught up. This is not a transient fetch error; it is data loss, and the outcome depends entirely on &lt;code>auto.offset.reset&lt;/code>. Many clients default to &lt;code>latest&lt;/code>, which turns this exception into silent skipping.&lt;/p></description></item><item><title>Kafka page cache thrashing: the backfill consumer that 100x's tail latency</title><link>https://www.netdata.cloud/guides/kafka/kafka-page-cache-thrashing-latency-cliff/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-page-cache-thrashing-latency-cliff/</guid><description>&lt;h1 id="kafka-page-cache-thrashing-the-backfill-consumer-that-100xs-tail-latency">Kafka page cache thrashing: the backfill consumer that 100x&amp;rsquo;s tail latency&lt;/h1>
&lt;p>Tail latency jumps from milliseconds to seconds while producer throughput and replication stay flat. CPU is normal. Every fetch request from tail consumers starts hitting disk. The culprit is usually a single backfill consumer reading historical data, evicting the hot working set from the OS page cache and turning a memory-speed system into a disk-bound one.&lt;/p>
&lt;p>The write path stays green. Under-replicated partitions do not increase. No broker has crashed. The only visible signs are elevated disk read latency and slow consumers. If the cluster slowed suddenly with no broker fault, suspect page cache thrashing from a backfill consumer.&lt;/p></description></item><item><title>Kafka produce request latency high: reading the TotalTimeMs breakdown</title><link>https://www.netdata.cloud/guides/kafka/kafka-produce-request-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-produce-request-latency-high/</guid><description>&lt;h1 id="kafka-produce-request-latency-high-reading-the-totaltimems-breakdown">Kafka produce request latency high: reading the TotalTimeMs breakdown&lt;/h1>
&lt;p>Producers are timing out or retrying. Client-side &lt;code>request-latency-avg&lt;/code> is elevated and broker &lt;code>TotalTimeMs&lt;/code> p99 is spiking. The total is unactionable by itself. Kafka breaks it into five sub-components, each implicating a different subsystem. You need all five via JMX or an equivalent metrics collector to know whether to fix disk, scale a thread pool, or replace a follower.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>&lt;code>TotalTimeMs&lt;/code> is the wall-clock time from when the broker&amp;rsquo;s network thread receives a produce request until the response is fully sent. It is the arithmetic sum of five phases:&lt;/p></description></item><item><title>Kafka producer timeout cascade: when retries pile load onto a slow broker</title><link>https://www.netdata.cloud/guides/kafka/kafka-produce-timeout-retry-cascade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-produce-timeout-retry-cascade/</guid><description>&lt;h1 id="kafka-producer-timeout-cascade-when-retries-pile-load-onto-a-slow-broker">Kafka producer timeout cascade: when retries pile load onto a slow broker&lt;/h1>
&lt;p>Your producers are timing out. P99 produce latency is climbing. You see more requests hitting the brokers, yet actual throughput of new messages is flat or falling. This is not a traffic spike. It is a producer timeout cascade: one slow broker causes clients to retry, and those retries add load to the same overloaded broker, closing the loop until the cluster is pinned.&lt;/p></description></item><item><title>Kafka purgatory size growing: delayed produce and fetch operations</title><link>https://www.netdata.cloud/guides/kafka/kafka-purgatory-size-growing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-purgatory-size-growing/</guid><description>&lt;h1 id="kafka-purgatory-size-growing-delayed-produce-and-fetch-operations">Kafka purgatory size growing: delayed produce and fetch operations&lt;/h1>
&lt;p>JMX shows &lt;code>kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize&lt;/code> climbing on one or more brokers. Produce purgatory holds &lt;code>acks=all&lt;/code> requests waiting for ISR completion. Fetch purgatory holds consumer and follower requests waiting for &lt;code>fetch.min.bytes&lt;/code>. A growing queue means requests spend more time inside the broker than clients expected. Producers time out and retry. Consumers sit idle. The cluster is not dead, but it is backing up at a precise choke point. This guide distinguishes normal long-polling from replication crisis.&lt;/p></description></item><item><title>Kafka quota throttling: throttle-time, runaway clients, and protecting the cluster</title><link>https://www.netdata.cloud/guides/kafka/kafka-quota-throttling/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-quota-throttling/</guid><description>&lt;h1 id="kafka-quota-throttling-throttle-time-runaway-clients-and-protecting-the-cluster">Kafka quota throttling: throttle-time, runaway clients, and protecting the cluster&lt;/h1>
&lt;p>Your Kafka producers are timing out. Consumer lag is growing. Client dashboards show elevated request latency, but the brokers are healthy: UnderReplicatedPartitions is zero and disk I/O looks fine. The culprit is often quota throttling: the cluster is enforcing per-client or per-user byte-rate limits, and one or more clients have hit the wall. The broker exposes this as throttle-time in JMX. That backpressure slows the client, but if the client is a runaway service or a backfill consumer, the throttling can cascade into widespread latency.&lt;/p></description></item><item><title>Kafka RecordTooLargeException / MESSAGE_TOO_LARGE: message size limits across the path</title><link>https://www.netdata.cloud/guides/kafka/kafka-message-too-large-error/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-message-too-large-error/</guid><description>&lt;h1 id="kafka-recordtoolargeexception--message_too_large-message-size-limits-across-the-path">Kafka RecordTooLargeException / MESSAGE_TOO_LARGE: message size limits across the path&lt;/h1>
&lt;p>Two errors surface: the producer client throws &lt;code>RecordTooLargeException&lt;/code> before the request hits the wire, or the broker returns &lt;code>MESSAGE_TOO_LARGE&lt;/code> in the produce response. Both mean a record batch exceeds a limit somewhere in the path, but the fix depends on exactly which limit and where the size is measured. These settings are not a single knob: &lt;code>max.request.size&lt;/code>, &lt;code>message.max.bytes&lt;/code>, &lt;code>max.message.bytes&lt;/code>, &lt;code>replica.fetch.max.bytes&lt;/code>, &lt;code>fetch.max.bytes&lt;/code>, &lt;code>max.partition.fetch.bytes&lt;/code>, and &lt;code>socket.request.max.bytes&lt;/code> must all align. Raise one limit without raising the others and you will wedge replication, strand consumers, or silently lose data on the next large message.&lt;/p></description></item><item><title>Kafka replica MaxLag growing: slow followers and replica fetcher health</title><link>https://www.netdata.cloud/guides/kafka/kafka-replica-fetcher-max-lag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-replica-fetcher-max-lag/</guid><description>&lt;h1 id="kafka-replica-maxlag-growing-slow-followers-and-replica-fetcher-health">Kafka replica MaxLag growing: slow followers and replica fetcher health&lt;/h1>
&lt;p>When &lt;code>kafka.server:type=ReplicaFetcherManager,name=MaxLag,clientId=Replica&lt;/code> climbs on a broker, the worst follower is failing to replicate fast enough. This metric is the maximum offset distance between a leader and its most lagging follower. In a healthy cluster it stays near zero. If the gap persists longer than &lt;code>replica.lag.time.max.ms&lt;/code>, the leader removes the follower from the ISR. Once enough replicas drop, partitions can fall below &lt;code>min.insync.replicas&lt;/code>, and producers using &lt;code>acks=all&lt;/code> hit &lt;code>NotEnoughReplicasException&lt;/code>.&lt;/p></description></item><item><title>Kafka request queue filling up: RequestQueueSize, queued.max.requests, and backpressure</title><link>https://www.netdata.cloud/guides/kafka/kafka-request-queue-full/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-request-queue-full/</guid><description>&lt;h1 id="kafka-request-queue-filling-up-requestqueuesize-queuedmaxrequests-and-backpressure">Kafka request queue filling up: RequestQueueSize, queued.max.requests, and backpressure&lt;/h1>
&lt;p>Your Kafka producers are timing out. Broker logs show no errors, but client-side metrics reveal growing latency and retries. On the broker, &lt;code>RequestQueueSize&lt;/code> climbs toward &lt;code>queued.max.requests&lt;/code> (default 500). Once the queue fills, network threads block on enqueue and stop reading from their sockets. Clients see TCP backpressure, time out, and retry. Retries add load, deepening the queue. This feedback loop correlates with falling &lt;code>RequestHandlerAvgIdlePercent&lt;/code>.&lt;/p></description></item><item><title>Kafka REQUEST_TIMED_OUT: produce requests that expire before replication completes</title><link>https://www.netdata.cloud/guides/kafka/kafka-request-timed-out-error/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-request-timed-out-error/</guid><description>&lt;h1 id="kafka-request_timed_out-produce-requests-that-expire-before-replication-completes">Kafka REQUEST_TIMED_OUT: produce requests that expire before replication completes&lt;/h1>
&lt;p>Producers using &lt;code>acks=all&lt;/code> throw &lt;code>TimeoutException&lt;/code> (error code &lt;code>REQUEST_TIMED_OUT&lt;/code>) when the broker accepts a produce request but cannot complete replication before &lt;code>request.timeout.ms&lt;/code> expires. The leader appends the record to its local log and waits in purgatory for acknowledgments from all in-sync replicas. If the ISR ack does not arrive before the client deadline, the producer disconnects and surfaces the error. The broker may still finish the write, but the producer has already moved on, creating a hidden replication backlog and a potential retry storm.&lt;/p></description></item><item><title>Kafka RequestHandlerAvgIdlePercent low: I/O thread saturation and overload</title><link>https://www.netdata.cloud/guides/kafka/kafka-request-handler-idle-percent-low/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-request-handler-idle-percent-low/</guid><description>&lt;h1 id="kafka-requesthandleravgidlepercent-low-io-thread-saturation-and-overload">Kafka RequestHandlerAvgIdlePercent low: I/O thread saturation and overload&lt;/h1>
&lt;p>You get paged because &lt;code>RequestHandlerAvgIdlePercent&lt;/code> is below 0.3 and falling. This is an exponentially weighted moving average, not a spike metric. A low value means the broker&amp;rsquo;s I/O handler threads have been saturated long enough that the request queue is backing up and clients are timing out.&lt;/p>
&lt;p>Treat above 0.5 as healthy, below 0.3 as critical, and below 0.1 as active overload. Even a stable 0.45 is dangerous: one broker failure can shift enough load to collapse the survivors.&lt;/p></description></item><item><title>Kafka retention not deleting old segments: retention.ms, retention.bytes, and the active segment</title><link>https://www.netdata.cloud/guides/kafka/kafka-retention-not-deleting-segments/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-retention-not-deleting-segments/</guid><description>&lt;h1 id="kafka-retention-not-deleting-old-segments-retentionms-retentionbytes-and-the-active-segment">Kafka retention not deleting old segments: retention.ms, retention.bytes, and the active segment&lt;/h1>
&lt;p>You set &lt;code>retention.ms&lt;/code> to 24 hours, but broker disk keeps climbing. A partition shows segment files older than the threshold, or the active segment has grown so large it consumes most of the volume. A topic with both &lt;code>retention.ms&lt;/code> and &lt;code>retention.bytes&lt;/code> may still appear to ignore them.&lt;/p>
&lt;p>Kafka retention is not a continuous sweep. &lt;code>retention.ms&lt;/code> and &lt;code>retention.bytes&lt;/code> apply independently to closed segments, and the check interval adds latency. The active segment is never deleted by retention alone. On compacted topics, &lt;code>retention.bytes&lt;/code> is ignored. Per-topic overrides shadow broker defaults.&lt;/p></description></item><item><title>Kafka Too many open files: file descriptor exhaustion from segments and connections</title><link>https://www.netdata.cloud/guides/kafka/kafka-too-many-open-files/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-too-many-open-files/</guid><description>&lt;h1 id="kafka-too-many-open-files-file-descriptor-exhaustion-from-segments-and-connections">Kafka Too many open files: file descriptor exhaustion from segments and connections&lt;/h1>
&lt;p>Producers time out, consumers disconnect, and the broker log shows &lt;code>java.io.IOException: Too many open files&lt;/code>. The broker may still run, but it cannot open new log segments or accept additional TCP connections. File descriptor exhaustion is a cliff-edge failure: the broker operates normally until it hits the hard limit, then the data path stops.&lt;/p>
&lt;p>Kafka brokers hold a file descriptor for every log segment and every network connection. Each partition maintains an active segment and older retained segments. A broker with thousands of partitions and tens of segments each, plus hundreds of client connections, can hold tens of thousands of open file descriptors. The default Linux per-process limit of 1024 is far below production requirements.&lt;/p></description></item><item><title>Kafka too many partitions per broker: controller load, recovery time, and the 4000 guideline</title><link>https://www.netdata.cloud/guides/kafka/kafka-too-many-partitions-per-broker/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-too-many-partitions-per-broker/</guid><description>&lt;h1 id="kafka-too-many-partitions-per-broker-controller-load-recovery-time-and-the-4000-guideline">Kafka too many partitions per broker: controller load, recovery time, and the 4000 guideline&lt;/h1>
&lt;p>Every replica on a Kafka broker carries fixed overhead: file descriptors, memory-mapped index files, replication fetcher load, and controller metadata. The guideline of roughly 4000 partitions per broker is not a hard architectural limit. It is an operational warning based on a serial bottleneck: the controller processes partition state changes one at a time. When a broker with 5000 partitions fails, the active controller queues thousands of events. Until the queue drains, leader elections stall, metadata propagation slows, and clients see &lt;code>NOT_LEADER_FOR_PARTITION&lt;/code>. Restarting the broker forces every replica to recover its logs and catch up from leaders before rejoining the ISR. Recovery time is a step function; a routine restart can become a multi-hour incident. Partition count is easy to ignore in steady state and catastrophic to discover during an outage.&lt;/p></description></item><item><title>Kafka UncleanLeaderElectionsPerSec > 0: confirmed silent data loss</title><link>https://www.netdata.cloud/guides/kafka/kafka-unclean-leader-election/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-unclean-leader-election/</guid><description>&lt;h1 id="kafka-uncleanleaderelectionspersec--0-confirmed-silent-data-loss">Kafka UncleanLeaderElectionsPerSec &amp;gt; 0: confirmed silent data loss&lt;/h1>
&lt;p>Your &lt;code>UncleanLeaderElectionsPerSec&lt;/code> alert fired. The JMX metric &lt;code>kafka.controller:type=ControllerStats,name=UncleanLeaderElectionsPerSec&lt;/code> shows &lt;code>OneMinuteRate &amp;gt; 0&lt;/code>, or &lt;code>Count&lt;/code> has incremented since your last check. This is confirmed data loss: a partition leader was elected from outside the ISR, and acknowledged records that the new leader does not possess are silently truncated.&lt;/p>
&lt;p>Producers that received acks for those records were given a durability guarantee the cluster just broke. Stop additional loss, understand scope, and fix the conditions that allowed it.&lt;/p></description></item><item><title>Kafka UnderMinIsrPartitionCount: confirming the write path is blocked</title><link>https://www.netdata.cloud/guides/kafka/kafka-under-min-isr-partition-count/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-under-min-isr-partition-count/</guid><description>&lt;h1 id="kafka-underminisrpartitioncount-confirming-the-write-path-is-blocked">Kafka UnderMinIsrPartitionCount: confirming the write path is blocked&lt;/h1>
&lt;p>&lt;code>UnderMinIsrPartitionCount&lt;/code> is non-zero and &lt;code>acks=all&lt;/code> producers are failing. Unlike &lt;code>UnderReplicatedPartitions&lt;/code>, which only opens a durability window, this metric confirms the broker is actively rejecting writes. It counts leader partitions where the in-sync replica set has shrunk below &lt;code>min.insync.replicas&lt;/code>. In steady state it must be zero.&lt;/p>
&lt;p>This article explains the metric, when to PAGE, and the exact checks to run when it fires.&lt;/p></description></item><item><title>Kafka UnderReplicatedPartitions > 0: the most important metric and how to clear it</title><link>https://www.netdata.cloud/guides/kafka/kafka-under-replicated-partitions/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-under-replicated-partitions/</guid><description>&lt;h1 id="kafka-underreplicatedpartitions--0-the-most-important-metric-and-how-to-clear-it">Kafka UnderReplicatedPartitions &amp;gt; 0: the most important metric and how to clear it&lt;/h1>
&lt;p>UnderReplicatedPartitions climbing above zero means a follower has fallen behind, the ISR has shrunk, and the cluster&amp;rsquo;s durability guarantee is degraded. One more failure on the wrong broker could make partitions unavailable or cause &lt;code>acks=all&lt;/code> writes to be rejected. Determine whether this is a transient blip from maintenance or the start of a cascading replication failure.&lt;/p>
&lt;h2 id="what-this-means">What this means&lt;/h2>
&lt;p>The JMX MBean &lt;code>kafka.server:type=ReplicaManager,name=UnderReplicatedPartitions&lt;/code> reports the number of partitions where this broker is the leader and the ISR count is below the configured replication factor. It is a per-broker gauge. A broker without leadership always reports zero, even when the cluster is degraded, so aggregate across all brokers to see the full picture.&lt;/p></description></item><item><title>Kafka ZooKeeper request latency high: metadata slowdowns in ZK mode</title><link>https://www.netdata.cloud/guides/kafka/kafka-zookeeper-request-latency-high/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-zookeeper-request-latency-high/</guid><description>&lt;h1 id="kafka-zookeeper-request-latency-high-metadata-slowdowns-in-zk-mode">Kafka ZooKeeper request latency high: metadata slowdowns in ZK mode&lt;/h1>
&lt;p>If you run Kafka in ZooKeeper mode and &lt;code>kafka.server:type=ZooKeeperClientMetrics,name=ZooKeeperRequestLatencyMs&lt;/code> is climbing, a sustained p99 above 100 ms means the controller event queue is already backing up. Above 1 s, you approach the &lt;code>zookeeper.session.timeout.ms&lt;/code> boundary and brokers risk session expiry. In ZK mode, every leader election, ISR change, and topic update flows through the ensemble. When ZK stalls, the controller stalls, metadata propagation freezes, and the cluster degrades in a way that looks like a broker problem but originates in the metadata plane.&lt;/p></description></item><item><title>Kafka ZooKeeper session expired: GC pauses, ISR drops, and controller loss</title><link>https://www.netdata.cloud/guides/kafka/kafka-zookeeper-session-expired/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.netdata.cloud/guides/kafka/kafka-zookeeper-session-expired/</guid><description>&lt;h1 id="kafka-zookeeper-session-expired-gc-pauses-isr-drops-and-controller-loss">Kafka ZooKeeper session expired: GC pauses, ISR drops, and controller loss&lt;/h1>
&lt;p>In ZooKeeper mode, a session expiry means ZK declared a broker dead. The Java process may still be running, but the cluster treats it as gone. If the broker was the controller, the metadata plane re-elects. If it was a leader, every partition it led starts a new leader election. If it was a follower, leaders remove it from the ISR. The default &lt;code>zookeeper.session.timeout.ms&lt;/code> is 18000 ms, and the most common trigger is a Full GC pause longer than that window. This guide applies to Kafka clusters running in ZooKeeper mode; KRaft mode does not use ZK sessions.&lt;/p></description></item></channel></rss>