It detects small-sized messages and accumulates those messages into larger TCP packets before sending data across the wire.

This process avoids the generation of unnecessarily large numbers of small packets.

The technical specification for the Nagle algorithm was published in 1984 asRFC 896.

Transmission Control Protocol (TCP) Header

Lifewire / Bradley Mitchell

Windows, Linux, and Java systems normally enable Nagle by default.

Therefore, applications written for those environments need to specify TCP_NODELAY to switch the algorithm off.

Such applications typically disable Nagle.

This algorithm was originally developed at a time when computer networks supported less bandwidth than they do today.

There are increasingly fewer situations today where data pipe applications can benefit from his algorithm.

The Nagle algorithm is only usable with TCP.

Other protocols, such asUDP, do not support it.