Kafka Compliance: Cluster Resilience
The Cluster Resilience page reports the availability signals relevant to business continuity for a Kafka cluster. Partition replication health, controller availability, and Connect task health determine whether the cluster continues to serve data through node failures.
The page is divided into a Kafka group and a Connect group. The signals come from three sources:
- The active controller count is derived from the controller ID in the cluster metadata that AxonOps reads from the brokers.
- Under-replicated partitions, offline partitions, under min ISR partitions, and the leader election rate are broker metrics collected by the AxonOps agents.
- Connect task failures are read from the task states reported by each Connect cluster’s REST API.
The four metric tiles depend on agents reporting metrics. A broker whose agent is not reporting contributes no metric data rather than being reported as failed or offline, so a healthy reading on a metric tile confirms the state of the reporting brokers, not of every broker in the cluster. To confirm that every broker reports, compare the cluster’s broker list with the Agent column of the Cluster Overview list view, where each node’s agent shows as up or down. The metrics are per-broker values, and the tile value must not be read as a current cluster-wide total.
Each metric tile turns to warning or error status when its value reaches the thresholds given below. The thresholds are fixed in the AxonOps UI, cannot be configured, and do not take the topics’ replication factor into account.
The behaviour described on this page applies to Apache Kafka 3.x, in both ZooKeeper and KRaft mode, and to Apache Kafka 4.x, which runs in KRaft mode only.
Active controller count
Section titled “Active controller count”The number of active controllers that the brokers report. AxonOps reads the controller ID from a Metadata request to the brokers and shows 1 when the ID identifies a broker, or 0 when Kafka returns no controller (ID -1). The value cannot exceed 1. What the controller ID represents depends on the cluster’s metadata mode:
- In ZooKeeper mode (Kafka 3.x), the controller ID is the broker currently acting as the active controller. A value of 0 means the cluster has no active controller.
- In KRaft mode (Kafka 3.x and all of 4.x), a broker returns the ID of a randomly chosen live broker as the controller ID, not the ID of the quorum leader (KIP-590). The tile therefore shows 1 whenever any broker is alive, and 0 only when the metadata contains no live broker. In KRaft mode the tile cannot detect the loss of the controller quorum.
| Value | Description | Status |
|---|---|---|
| 1 | Healthy | Pass |
| 0 | Quorum lost / split-brain risk | Error |
| None (dash) | Controller not reported yet | No status |
The descriptions are the labels shown on the tile. In ZooKeeper mode, a value of 0 means no active controller: existing partitions continue to serve reads and writes through their current leaders, but metadata changes such as topic creation and partition reassignment, and leader elections, stop until a controller is elected. Because the tile cannot report more than one controller, it does not detect a condition in which two nodes each act as controller.
On a KRaft cluster, check quorum leadership directly with the Kafka tool:
kafka-metadata-quorum.sh --bootstrap-server <host:port> describe --statusThe output names the current quorum leader (LeaderId) and lists the voters and observers.
Under-replicated partitions
Section titled “Under-replicated partitions”The broker metric UnderReplicatedPartitions, which each broker reports as the number of partitions it leads whose in-sync replica set (ISR) is smaller than the set of replicas assigned to the partition. A non-zero value means those partitions have reduced fault tolerance. The tile shows a warning from 1 and an error from 5. The Compliance Overview Under-Replicated Partitions tile reports the same metric.
An under-replicated partition remains available while it has a leader; the risk is to data safety. Where the ISR has shrunk to the leader alone and min.insync.replicas is 1, writes acknowledged with acks=all are held on one replica, and one further failure can lose acknowledged data.
Offline partitions
Section titled “Offline partitions”The controller metric OfflinePartitionsCount, which counts the partitions with no available leader. Offline partitions cannot be produced to or consumed from. Any value of 1 or more is an error. Where the metric is reported depends on the metadata mode:
- In ZooKeeper mode (Kafka 3.x), every broker registers the metric, and only the active controller reports a non-zero value.
- In KRaft mode (Kafka 3.x and 4.x), only nodes with the controller role register the metric; standby controllers report the value they replay from the metadata log. On a KRaft cluster with dedicated controller nodes, the brokers do not expose the metric, and the tile has data only when the AxonOps agent is installed on the controller nodes (agent
node_typekraft-controller, see Kafka agent setup).
An offline partition is an availability loss; whether it is also a data-safety loss depends on unclean.leader.election.enable. With the default false, the data remains on the unavailable replicas and the partition returns when one of them recovers. With true, Kafka may elect an out-of-sync replica as leader, and acknowledged writes that the replica had not received are lost. The tile does not distinguish the two cases.
Under min ISR partitions
Section titled “Under min ISR partitions”The broker metric UnderMinIsrPartitionCount, which each broker reports as the number of partitions it leads whose in-sync replica count is below min.insync.replicas, the setting that fixes how many in-sync replicas must acknowledge a write sent with acks=all. In Kafka 3.x and 4.x, produce requests with acks=all to these partitions fail with a NotEnoughReplicas error, or NotEnoughReplicasAfterAppend where the in-sync replica set shrinks after the write is appended. Idempotent and transactional producers require acks=all and are therefore affected; producer idempotence is enabled by default from Kafka 3.0 (KIP-679), so a producer on default settings is affected. Producers using acks=0 or acks=1 continue to write, at reduced durability. Any value of 1 or more is an error.
Leader election rate
Section titled “Leader election rate”The MeanRate attribute of the controller metric LeaderElectionRateAndTimeMs (kafka.controller:type=ControllerStats), labelled on the tile as peak leader elections per second (mean rate). The tile shows a warning from 0.1 elections per second and an error from 1.
The metric exists in ZooKeeper mode only, where the active controller records the elections it performs. KRaft mode has no equivalent metric, so on a KRaft cluster, including every Kafka 4.x cluster, the tile has no data.
MeanRate is the average rate since the meter was created when the broker started, not the rate over a recent window. A burst of elections therefore raises it only slightly on a long-running broker, and a recent restart makes it sensitive to the elections that follow startup. The same metric’s OneMinuteRate, FiveMinuteRate, and FifteenMinuteRate attributes give windowed rates. A sustained elevated rate indicates instability, such as brokers repeatedly leaving and rejoining the in-sync replica set, rather than the isolated elections expected during a controlled restart.
Failure effects on the tiles
Section titled “Failure effects on the tiles”| Event | Tile effect | Availability | Data safety |
|---|---|---|---|
| Broker loss | Under-replicated partitions rises on the surviving leaders; offline partitions rises for partitions whose only in-sync replica was on the lost broker | Partitions with another in-sync replica elect a new leader and continue | Acknowledged writes are retained where another in-sync replica held them |
| Controller loss | ZooKeeper mode: active controller count may show 0 until a new controller is elected. KRaft mode: no change | Existing partitions continue to serve; metadata changes wait for a new controller | Not affected by the controller loss alone |
| All replicas of a partition offline (storage intact) | Offline partitions rises, where the metric is reported | The partition is unavailable until a replica returns | With unclean.leader.election.enable=false, data is retained on the offline replicas and the partition recovers when one returns; with true, acknowledged writes missing from the replica elected leader are lost. Where the replicas’ storage is destroyed, the data is lost under either setting |
| Agent loss without broker loss | The broker’s metrics stop contributing; no tile reports a failure | Not affected | Not affected |
Under-replicated and offline partitions caused by a broker outage usually clear when the broker returns and its replicas catch up. The remedy is to restore the broker, as described in Kafka Brokers and the Kafka operations troubleshooting guide; restoring data from a backup is not a remedy for broker unavailability.
Connect task failures
Section titled “Connect task failures”The number of Kafka Connect tasks in the FAILED state across every Connect cluster registered against the Kafka cluster. A failed task stops moving data for its connector until it is restarted, which interrupts the pipelines that depend on it.
Selecting the tile lists each failed task with its Connect cluster, connector, task number, worker, and the first line of its error trace. When no task has failed, the tile shows “All Connect tasks running.” When Kafka Connect is not enabled in AxonOps, it shows “Kafka Connect is not enabled.”
Related pages
Section titled “Related pages”The underlying metrics are described in the Kafka replication and controller dashboard references under Metrics Dashboards. The controller quorum and its election behaviour are described in the KRaft reference. Broker state is described in Kafka Brokers, and Connect task state in Kafka Connect.
Standards alignment
Section titled “Standards alignment”The signals on this page support the following ISO/IEC 27002:2022 controls: 5.30 ICT readiness for business continuity, 8.14 Redundancy of information processing facilities, and 8.16 Monitoring activities.