title: Implications of keeping linger.ms at 0
body: <p>We are using kafka 0.10.2.1. The documentation specifies that a buffer is available to send even if it isn't full-</p>
  
  <blockquote>
    <p>By default a buffer is available to send immediately even if there is additional unused space in the buffer. However if you want to reduce the number of requests you can set linger.ms to something greater than 0.</p>
  </blockquote>
  
  <p>However, it also says that the producer will attempt to batch requests even if linger time is set to 0ms-</p>
  
  <blockquote>
    <p>Note that records that arrive close together in time will generally batch together even with linger.ms=0 so under heavy load batching will occur regardless of the linger configuration; however setting this to something larger than 0 can lead to fewer, more efficient requests when not under maximal load at the cost of a small amount of latency.</p>
  </blockquote>
  
  <p>Intuitively, it seems that any kind of batching would require some linger time, and the only way to achieve a linger time of 0 would be to make the broker call synchronised. Clearly, keeping the linger time at 0 doesn't appear to harm performance as much as blocking on the send call, but seems to have some impact on performance. Can someone clarify what the docs are saying above?</p>