TODO google silly window syndrome Problem with TCP
- Happens when receiver doesn’t consume data fast enough
- Receiver advertises very small window
- Packets will have smaller and smaller data size (but the header size will remain the same)
- More bandwidth wasted on header rather than actual data
Solutions:
- Delayed ACK (receiver-side approach)
- But if delay too long, sender will think timeout and retransmit
- So ACK should be delayed so that it is sent right before the timeout is hit
- Typically, 200ms of delay used
- Nagle’s algorithm (sender-side approach)
Socket options to turn off:
TCP_NODELAY
disables Nagle’s algorithmTCP_QUICKACK
disables Delayed ACK protocol
What happens if Delayed ACK and Nagle’s algorithm are both applied?
- TODO google