Incoming Byte Rate
The metric displays the mean rate of incoming bytes per second to each topic and each kafka broker at any given time.
Value will increase as the volume and frequency of messages being sent to the topic increases.
Use cases
How much data are all applications producing to my topic?
It could be useful to know how much data is being produced to the topic or to the broker. So you can estimate your space needs better.
To do so, please, refer to the Using aggregator or Using groupBy. This examples will help to build a request for topic or for each broker based on your needs.
Basic usage
Please refer to the example incoming byte rate
provided in the API docs
This request is asking for incoming byte rate per
second, averaged over the entire provided rate-size [5M] (default value) to topic payment-events-stream
on
environment dev
for last 15 minutes with the step-size of 1 minute.
Basic Request
Unresolved include directive in modules/ROOT/pages/self-service/client-metrics/topic/incoming-byte-rate/incoming-byte-rate.adoc - include::example$/client-metrics/topic/incoming-byte-rate/simple-request.json[]
The below part of sample response, represents the incoming byte rate to the topic on each kafka broker.
Basic Response
Unresolved include directive in modules/ROOT/pages/self-service/client-metrics/topic/incoming-byte-rate/incoming-byte-rate.adoc - include::example$/client-metrics/topic/incoming-byte-rate/simple-response.json[]
This metric can be used to determine how much load is being generated by individual topics.
Advanced usage
Using aggregator
By adding aggregator
to the request, the incoming byte rate of the
topic will be aggregated over all kafka brokers.
For instance asking for the sum
aggregation function, will result in the sum of incoming byte rate of the topic among all existing kafka brokers.
Request using sum aggregator
Unresolved include directive in modules/ROOT/pages/self-service/client-metrics/topic/incoming-byte-rate/incoming-byte-rate.adoc - include::example$/client-metrics/topic/incoming-byte-rate/request-with-sum.json[]
The below response represents the incoming bytes rate of the topic on a Kafka cluster.
Response using sum aggregator
Unresolved include directive in modules/ROOT/pages/self-service/client-metrics/topic/incoming-byte-rate/incoming-byte-rate.adoc - include::example$/client-metrics/topic/incoming-byte-rate/response-with-sum.json[]
Using max instead of sum will result in maximum incoming rate to a single broker.
Using groupBy
If you want to get response grouped by some label - you can use groupBy
Request using groupBy
Unresolved include directive in modules/ROOT/pages/self-service/client-metrics/topic/incoming-byte-rate/incoming-byte-rate.adoc - include::example$/client-metrics/topic/incoming-byte-rate/request-with-groupBy.json[]
The below response represents the rate in bytes of the partition on each Kafka broker (pod), with data grouped by pod.
Response using groupBy
Unresolved include directive in modules/ROOT/pages/self-service/client-metrics/topic/incoming-byte-rate/incoming-byte-rate.adoc - include::example$/client-metrics/topic/incoming-byte-rate/response-with-groupBy.json[]