The Nagle algorithm, named after engineer John Nagle, was designed to reduce network congestion caused by small packet problems with TCP applications. UNIX implementations began using the Nagle algorithm in the 1980s, and it remains a standard feature of TCP.
The Nagle algorithm processes data on the transmit side of TCP applications using a method called nagling. It detects small messages and assembles them into larger TCP packets before sending data over the wire. This process prevents the generation of unnecessarily large numbers of small packets.
The technical specification for the Nagle algorithm was published in 1984 as RFC 896. The decisions about how much data to collect and how long to wait between transmissions are critical to overall performance.
Nagling can efficiently use the bandwidth of a network connection at the cost of adding delay or latency. An example described in RFC 896 illustrates the potential bandwidth benefits and the rationale for its creation: