← Back to context

Comment by forrestthewoods

3 years ago

Meanwhile almost every project I work on is latency sensitivity and I’ve lost track of how many times the fix to bad performance was “disable Nagles algorithm”.

Honestly the correct solution here is probably “there is no default value, the user must explicitly specify on or off”. Some things just warrant a coder to explicitly think about it upfront.

It’s delayed ack on the client side which adds that slowdown. The spec allows the client to wait up to 500 ms to send it.

  • Delayed ACKs send an ACK every-other-packet. So you have to wait at least 200ms for the first ACK. So if you have enough data for two packets then you won’t even notice a delay (probably most data these days unless you have jumbo frames all the way to the client).

    If you control the client, you can turn on quick ACKs and still use Nagle’s algorithm to batch packets.