Grokking Operating Systems and Networking for Backend Engineers
Vote

0% completed

​

Nagle's Algorithm and Delayed ACKs

A client sends orders to a server on the same machine, over loopback, where a round trip takes well under a millisecond. Each order is written in two parts, a header line and then a JSON body, with two send() calls:

sock.sendall(HEADER) sock.sendall(BODY)

Over 200 orders on one open connection, the median order took 41.00 ms. Combining the two parts into one send() call, with nothing else changed, brought the median down to 0.04 ms, about a thousand times faster.

Two features of TCP, each sensible on its own, caused the difference

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content