news.volyx.in

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

491 points by eieio · 213 days ago · 179 comments on HN

Article summary

The article discusses the TCP_NODELAY option and its relation to Nagle's algorithm, which was designed to improve network throughput by reducing the number of small packets sent over the network. However, the author argues that this algorithm is no longer necessary in modern systems and can actually cause latency issues. The article suggests that TCP_NODELAY should be enabled by default, especially in latency-sensitive distributed systems. This would allow for more efficient communication and reduce the need for manual configuration.

Main themes

  • Nagle's algorithm
  • TCP_NODELAY
  • Network latency
  • Distributed systems
  • Legacy technology
  • Network protocols

What commenters say

  • Nagle's algorithm is still useful in certain situations, such as when applications are not designed to handle packet sizing efficiently.
  • The default behavior of TCP should be changed to enable TCP_NODELAY, as it is no longer necessary to worry about small packet overhead.
  • Disabling Nagle's algorithm can make fingerprinting easier, which is a security concern that should be considered.
  • Legacy devices and systems may still require the use of older protocols and settings, such as 10mbit half duplex, due to technical debt and maintenance costs.
  • Modern applications should be designed to handle packet sizing and latency efficiently, rather than relying on the kernel to optimize network traffic.
  • The use of TCP_NODELAY can have significant performance benefits in certain applications, such as multiplayer games and real-time systems.
  • The interaction between Nagle's algorithm and delayed ACKs can cause significant latency issues, and TCP_NODELAY can help mitigate these problems.
  • The decision to enable or disable Nagle's algorithm should be made on a per-application basis, rather than relying on a system-wide default.