news.volyx.in

It's always TCP_NODELAY (brooker.co.za)

884 points by todsacerdoti · 827 days ago · 268 comments on HN

Article summary

The article discusses the TCP_NODELAY option and its relation to Nagle's algorithm, which was designed to reduce overhead in TCP transmissions by inhibiting the sending of new segments when previous data remains unacknowledged. However, the author argues that this algorithm is no longer necessary in modern systems and can actually cause latency issues. The author suggests that TCP_NODELAY should be enabled by default, especially in latency-sensitive distributed systems. This would allow for faster data transmission, even if it means some applications may need to be modified to handle the change.

Main themes

  • TCP_NODELAY
  • Nagle's algorithm
  • Latency optimization
  • Distributed systems
  • Network protocol design

What commenters say

  • Some argue that Nagle's algorithm is still necessary to prevent small packet overhead, even if it's not as significant as it was in the past.
  • Others believe that applications should be fixed to handle buffering and packetization efficiently, rather than relying on the OS to optimize performance.
  • Enabling TCP_NODELAY by default would improve performance in latency-sensitive applications, but may require changes to some existing code.
  • The trade-off between reducing overhead and increasing latency is a complex issue, and there is no one-size-fits-all solution.
  • Some commenters suggest that the OS should not try to abstract away low-level details, and that developers should be aware of the implications of their code on network performance.
  • Others argue that the role of the OS is to provide a convenient abstraction, and that developers should not be expected to handle low-level details themselves.
  • There are differing opinions on whether the benefits of enabling TCP_NODELAY outweigh the potential drawbacks, such as increased network congestion.
  • Some argue that the issue is not with Nagle's algorithm itself, but with the interaction between Nagle's algorithm and other TCP features, such as delayed ACKs.