Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A broker may be alive but unable to establish new connections, emit metrics, or emit logs due to failed DNS resolution. It would be helpful to have a metric that counts the number of brokers registered to a cluster since it is not altogether obvious that a particular broker is not emitting metrics or logs. It would also be helpful to count the number of unfenced brokers so that it is known how many brokers are present in the metadata response and how many are not.

Public Interfaces

We propose adding two new controller metrics. Note that these metrics are 0 on all nodes except the active controller.

Attribute NameValue when using ZKValue When using KRaft
kafka.controller:type=

...

KafkaController:ActiveBrokerCountThe number of brokers known to the KafkaControllerThe number of registered and unfenced brokers
kafka.controller:type=KafkaController:FencedBrokerCountAlways 0

...

Attribute NameDescriptionUnfencedBrokerCount
The number of registered
unfenced brokers in a quorum-based or ZK-based cluster.
but fenced brokers


Compatibility, Deprecation, and Migration Plan

N/A

Rejected Alternatives

No migration plan is needed because these metrics are new.

Rejected Alternatives

We discussed the possibility of having a metric which would count all brokers, fenced and unfenced. However, in the ZK world, unlike in the KRaft world, this would be equivalent to counting all active brokers. This might lead people to start using the metric that way, which could complicate their transition from ZK to KRaft. Therefore, it's better to have a metric for active brokers specifically, rather than a metric for all registered brokers.N/A