previous | start | next

Optional: TCP Flow Control, Congestion Control and Slow Start

TCP attempts to make the best possible use of the underlying network, by sending data at the highest possible rate that won't cause segment loss. There are two aspects to this:
 
Flow Control
The two TCPs involved in a connection each maintain a receive window for the connection, related to the size of their receive buffers. For TCP "A", this is the maximum number of bytes that TCP "B" should send to it before "blocking" and waiting for an ACK. All TCP segments contain a window field, which is used to inform the other TCP of the sender's receive window size -- this is called "advertising a window size". At any time, for example, TCP B can have multiple segments "in-flight" -- that is, sent but not yet ACK'd -- up to TCP A's advertised window.
 
Congestion Avoidance and Control
When a connection is initially established, the TCPs know nothing at all about the speed, or capacity, of the networks which link them. The built-in "slow start" algorithm controls the rate at which segments are initially sent, as TCP tentatively discovers reasonable numbers for the connection's Round Trip Time (RTT) and its variability. TCP also slowly increases the number of segments "in-flight", since this increases the utilisation of the network.
 
Every TCP in the entire Internet is attempting to make full use of the available network, by increasing the number of "in-flight" segments it has outstanding. Ultimately there will come a point where the sum of the traffic, in some region of the network exceeds one or more router's buffer space, at which time segments will be dropped. When TCP "times out", and has to resend a dropped segment, it takes this as an indication that it (and all the other TCPs) have pushed the network just a little too hard. TCP immediately reduces its congestion window to a low value, and slowly, slowly allows it to increase again as ACKs are received. Congestion control mechanisms are still a hot research topic in the Internet!

 
Lecture 11: Reliable Transport -- TCP Copyright © 2005 P.Scott, La Trobe University Bendigo.


previous | start | next