Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This description seems incorrect #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions kafka/monitoring-kafka-performance-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ If you are seeing low response rates, a number of factors could be at play. A go
#### Metric to watch: Request rate
The request rate is the rate at which producers send data to brokers. Of course, what constitutes a healthy request rate will vary drastically depending on the use case. Keeping an eye on peaks and drops is essential to ensure continuous service availability. If [rate-limiting](https://kafka.apache.org/documentation/#design_quotas) is not enabled, in the event of a traffic spike, brokers could slow to a crawl as they struggle to process a rapid influx of data.
#### Metric to watch: Request latency average
The average request latency is a measure of the amount of time between when `KafkaProducer.send()` was called until the producer receives a response from the broker. "Received" in this context can mean a number of things, as explained in the paragraph on [response rate](#metric-to-watch-response-rate).

The average request latency measures the timespan of a producer request in the purgatory. That is, between the request being created and its response being received. "Received" in this context can mean a number of things, as explained in the paragraph on [response rate](#metric-to-watch-response-rate).
A producer doesn't necessarily send each message as soon as it's created. The producer's [`linger.ms`](https://kafka.apache.org/documentation/#producerconfigs) value determines the maximum amount of time it will wait before sending a message batch, potentially allowing it to accumulate a larger batch of messages before sending them in a single request. The default value of `linger.ms` is 0 ms; setting this to a higher value can increase latency, but can also help improve throughput since the producer will be able to send multiple messages without incurring network overhead for each one. If you increase `linger.ms` to improve your Kafka deployment's throughput, you should monitor request latency to ensure it doesn't rise beyond an acceptable limit.

Since latency has a strong correlation with throughput, it is worth mentioning that modifying `batch.size` in your producer configuration can lead to significant gains in throughput. Determining an optimal batch size is largely use case dependent, but a general rule of thumb is that if you have available memory, you should increase batch size. Keep in mind that the batch size you configure is an upper limit. Note that small batches involve more network round trips, which can reduce throughput.
Expand Down