Nagle's algorithm

The Nagle algorithm is named after John Nagle. It is normally used in the TCP portion of a network protocol.

The Nagle algorithm is to prevent small packages, as many small packets reduce the throughput of the connection. This results from the fact that for each packet, a header is created with a fixed size. In this manner, falling of many small packets, the header more weight.

The Nagle algorithm works as follows:

  • If a packet is full, it will send.
  • Is not full of the packet, then it send if no more unacknowledged packets are traveling.

If this behavior is not desired, can the Nagle algorithm on POSIX -compliant operating systems off with the setsockopt TCP_NODELAY option. In practice, this is done for example in interactive session protocols such as Telnet or SSH to shorten the reaction time of the opposite side to keyboard input or screen output.

The exact definition can be found in RFC 896 and RFC 1122.

  • Network protocol
590795
de