Versions Compared

Key

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

...

Briefly list any new interfaces that will be introduced as part of this proposal or any existing interfaces that will be removed or changed. The purpose of this section is to concisely call out the public contract that will come along with this feature.

New Metrics

MBean

Description

Copy

kafka.server:type=BrokerTopicMetrics, name=
RemoteCopyLagRecords
RemoteCopyLagBytes, topic=([-.w]+)
, partition=([-.w]+)

The remote

records

copy bytes lag of a topic is defined as the number of

records

bytes in non-active segments eligible for tiering not yet uploaded to the remote storage.

In other words, this metric shows the difference between the latest local segment candidate for upload and the latest remote segment in bytes. It shows how the RemoteLogManager is copying the backlog of segments. Normally this lag should be zero, but it will grow when upload is slower than the increase on candidate segments to upload.

kafka.server:type=BrokerTopicMetrics, name=
RemoteCopyLagBytes
RemoteCopyLagSegments, topic
=([-.w]+), partition
=([-.w]+)

The remote

bytes

copy segments lag of a topic is defined as the number of

bytes in

non-active segments eligible for tiering not yet uploaded to the remote storage.

This metric is similar to the above, but it shows the lag in number of segments rather than the bytes.

Delete

kafka.server:type=BrokerTopicMetrics, name=
RemoteDeleteLagRecords
RemoteDeleteLagBytes, topic
=([-.w]+), partition
=([-.w]+)

The

tier

remote delete bytes lag of a topic is defined as the number of

records

bytes in non-active segments marked for deletion but not yet deleted from remote storage.

In other words, this metric shows the difference between latest remote candidate segment to keep based on retention and the oldest remote segment in bytes. If it goes above 0 then it shows that the RemoteLogManager is having a backlog of segments to delete.

kafka.server:type=BrokerTopicMetrics, name=
RemoteDeleteLagBytes
RemoteDeleteLagSegments, topic=([-.w]+)
, partition=([-.w]+)To be added pending email discussion

The remote delete bytes lag of a topic is defined as the number non-active segments marked for deletion but not yet deleted from remote storage.

This metric is similar to the above, but it shows the lag in number of segments rather than the bytes.

kafka.server:type=BrokerTopicMetrics, name=RemoteDeleteRequestsPerSec, topic=([-.w]+)

The number of delete requests for expired remote segments to remote storage per second.

kafka.server:type=BrokerTopicMetrics, name=RemoteDeleteErrorsPerSec, topic=([-.w]+)

The number of delete requests for expired remote segments to remote storage which resulted in errors per second.

Fetch

kafka.server:type=BrokerTopicMetrics, name=BuildRemoteLogAuxStateRequestsPerSec, topic=([-.w]+)

The number of requests for rebuilding the auxiliary state for a topic-partition per second.

kafka.server:type=BrokerTopicMetrics, name=BuildRemoteLogAuxStateErrorsPerSec, topic=([-.w]+)

The number of requests for rebuilding the auxiliary state for a topic-partition which resulted in errors per second.

kafka.server:type=DelayedRemoteFetchMetrics, name=ExpiresPerSec

The number of expired remote fetches per second.

Others

kafka.server:type=BrokerTopicMetrics, name=RemoteLogSizeComputationTime, topic=([-.w]+)

The amount of time needed to compute the size of the remote log.

kafka.server:type=BrokerTopicMetrics, name=RemoteLogSizeBytes, topic=([-.w]+)

The total size of a remote log in bytes.

kafka.server:type=BrokerTopicMetrics, name=RemoteLogMetadataCount, topic=([-.w]+)

The total number of metadata entries for remote storage.

kafka.server:type=DelayedRemoteFetchMetrics, name=ExpiresPerSec

To be added pending explanation

Proposed Changes

Constraints

...

If there are alternative ways of accomplishing the same thing, what were they? The purpose of this section is to motivate why the design is the way it is and not some other way.

  1. Emit the lag metrics only on topic level - we rejected this alternative because pbecause it wouldn't allow an operator to fairly quickly understand whether any problems are isolated to individual brokers or widespread through the cluster.
  2. Update the lag metrics on each archival/deletion cycle - we rejected this alternative because if the cycle does not run for whatever reason the old metric would be emitted even if new segments have become eligible for tiering.