|
Nagle's algorithm is a way of avoiding network congestion by limiting to at most one the number of "tinygrams" (that is, packets that are less than full size) an application can have outstanding at once. It does this by concatenating small segments until it has a full segment or it receives an acknowledgement of the outstanding small segment. The algorithm was proposed by John Nagle in RFC896. Its latest incarnation, which differs slightly from Nagle's original formulation, is described in RFC1122.
The Nagle algorithm can sometimes interact with the TCP's "delayed ACK" mechanism, another congestion avoidance strategy, in a way that increases network congestion and delay. For this reason, it is sometimes disabled, but this is appropriate only in very special circumstances. See my book Effective TCP/IP Programming or Rich Stevens' TCP/IP Illustrated, Volume 1 for complete details .
|