We are planning to use 3 kafka-brokers and a zookeeper node. We have kept one partition for each topic. But we have a stringent requirement of latency under 5ms. We are using reactive-kafka client library https://github.com/akka/reactive-kafka.
e.g. We have a producer that produces 128 byte(approx) data at every 30ms and Consumer consumer at every 50 ms.
We tried with
linger.ms=0
compression.type=none
acks=0
on producer side.
Polling on consumer side at 50ms
But as soon as we increase the frequency of producing to 1 second, the latency starts becoming unpredictable with 1ms to 70ms.
So, what should if we always require the latency under 5ms what tuning needs to be done at kafka-broker, producer and consumer level.