Versions Compared

Key

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

Table of Contents

This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.

Status

Current state:  [Under Discussion]Accepted

Discussion thread: herehere [Change the link from the KIP proposal email archive to your own email thread]

JIRAherehttps://issues.apache.org/jira/browse/KAFKA-12882

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

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 NameDescriptionRegisteredBrokerCount
Attribute NameValue when using ZKValue When using KRaft
kafka.controller:type=KafkaController

...

:ActiveBrokerCountThe number of brokers known to the KafkaController
The number of
brokers registered in a cluster.Attribute NameDescriptionUnfencedBrokerCount
registered and unfenced brokers
kafka.controller:type=KafkaController

...

:FencedBrokerCountAlways 0
The number of registered
unfenced brokers in a 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