Has anyone tested voting latency with TCP_NODELAY? It disables Nagle's algorithm which might reduce latency.

From what I understand: By default TCP will accumulate data to a certain size before sending a packet, causing a small delay. With this TCP_NODELAY flag on, it will send data immediately without waiting, but with less efficiency because there will be more packets, meaning more headers, meaning less useful bandwidth overall.

I realize it would probably be slower when bootstrapping, which might need a reconfiguration of the socket when talking to a peer that is bootstrapping, etc.

Single transaction latency is already pretty low and our most frequently used messages, votes, aren't particularly small.

We can run it on a small test cluster to see if there is any perceivable change but I suspect we're unlikely to get an improvement.

1 Like