Skip to content

Instantly share code, notes, and snippets.

@sleemer
Created October 9, 2016 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sleemer/a713552f52b00aa65f6623e53455e9bd to your computer and use it in GitHub Desktop.
Save sleemer/a713552f52b00aa65f6623e53455e9bd to your computer and use it in GitHub Desktop.
Short notes about TCP

Flow Control

Flow control is a mechanism to prevent the sender from overhelming the receiver. rwnd - receive window. Each ACK packet carries latest rwnd value for each side.

Slow-start

cwnd - congestion window. Sender-side limit on the amount of data the sender can have in flight before receiving an acknowledgment (ACK) from the client. cwnd is set up for each TCP connection. Maximum amount of data in flight is the minimum of the rwnd and cwnd.

  • Time to reach the cwnd size of size N: Time = RTT(log(N/initial cwnd)) (RTT - round trip time)

Congestion avoidance

Specifies algorithms for how to grow a window to minimize further packet loss once cwnd is reset.

Bandwidth-delay product (BDP)

Product of data link’s capacity and its end-to-end delay. The result is the maximum amount of unacknowledged data that can be in flight at any point in time. Data rate = Min(rwnd, cwnd)/RTT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment