Kafka Quotas, Latency
kafka client - quotas, latency https://aivarsk.com/2021/11/01/low-latency-kafka-producers/
What still makes me wonder is why librdkafka does not set TCP_NODELAY by default. Because they are doing something similar to Nagle’s algorithm in the library code by using linger.ms/ queue.buffering.max.ms settings and buffering messages.
Long story short, to optimize producers for latency, you should set both:
socket.nagle.disable = True queue.buffering.max.ms = 0 I think you should also set socket.nagle.disable for low latency consumers to deliver acknowledgments as soon as possible.