I always cringe a bit inside, when reading articles like this.<p>nodelay and cork are different, indeed, but opposites? They both try to achieve the same effect, put more data in before sending a packet.<p>> [...] This mechanism is ensured by Nagle’s algorithm, and 200ms [...]<p>Absolutely not. Nagle's algorithm does not have any delay or timer build in. It simply holds back non-full packets, when there is data in flight (not acked). The second half of the problem is delayed acks, but this is not mentioned in the article, instead it goes on saying<p>> [...] but Nagle is not relevant to the modern Internet [...]<p>which is indeed popular belief, but a very superficial analysis that holds no water if you study it further.<p>The feeling I always get from articles like this is they border on "technical religion". It sounds correct, it is technical, it isn't even false, but it doesn't paint a clear picture, instead it mystifies things further.<p>The problems nginx had:<p>1. nagle and http keepalive don't play nice together, the last bit of data might be artificially delayed, especially when delayed acks come into play. nodelay seems needed here. (It is not though, see that Minshall bit.)<p>2. how to send headers and use sendfile for the body, and fill the first packet with more then just the headers? nopush (tcp_cork) is a solution.