summaryrefslogtreecommitdiff
path: root/High Latency TCP Might Be Caused By TCP No Delay.md
blob: a70efc119ac28d68e85e3de1b7312bb6a9079918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[[TCP]] [[Networking]]

# High Latency TCP Might Be Caused By TCP No Delay
https://brooker.co.za/blog/2024/05/09/nagle.html

Describes a situation where two algorithms in TCP bite each other:
- Nagle's algorithm tries to prevent sending very small data packets to minimze header overhead
- Delayed ACK delays acks until data's ready

So the first holds packets back until an ACK is received, the second holds ACK until the response is ready.

Also due to modern systems the penalty for small datagrams is much lower.

To get rid of Nagle's algorithm when latency matters: enable TCP_NODELAY.