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:

  1. Delayed ACK (receiver-side approach)
    1. But if delay too long, sender will think timeout and retransmit
    2. So ACK should be delayed so that it is sent right before the timeout is hit
    3. Typically, 200ms of delay used
  2. Nagle’s algorithm (sender-side approach)

Socket options to turn off:

  • TCP_NODELAY disables Nagle’s algorithm
  • TCP_QUICKACK disables Delayed ACK protocol

What happens if Delayed ACK and Nagle’s algorithm are both applied?

  • TODO google