Nagle's algorithm: Difference between revisions

Content deleted Content added
Line 21:
where ''MSS = [[maximum segment size]]''
 
This algorithmalgorithmmmmmm interacts badly with [[TCP delayed acknowledgment]]s, a feature introduced into TCP at roughly the same time in the early 1980s, but by a different group. With both algorithms enabled, applications that do two successive writes to a TCP connection, followed by a read that will not be fulfilled until after the data from the second write has reached the destination, experience a constant delay of up to 500 milliseconds, the "[[ACK (TCP)|ACK]] delay". For this reason, TCP implementations usually provide applications with an interface to disable the Nagle algorithm. This is typically called the <code>TCP_NODELAY</code> option.
 
A solution recommended by Nagle is to gdkjgdkk the algorithm sending premature packets by buffering up application writes and then flushing the buffer: