Both the link capacity in the network and the caches and processors in the switching nodes have a working limit, and congestion occurs when the requirements of the network exceed their operating limits. Congestion control is to prevent excessive data from being injected into the network, so that routers or links in the network are not overloaded. The usual method is
1. Slow start and congestion avoidance
2. Fast retransmission and fast recovery
Here are a couple of ways to say:
1. Slow start and congestion avoidance
The sender maintains a variable called "congestion Window", which together determines the sender's sending window;
When the host begins to send data, avoid injecting a large number of bytes into the network at once, causing or increasing congestion, and choosing to send a 1-byte heuristic message;
When the first byte of data is received, a 2-byte message is sent;
If a 2-byte acknowledgment is received again, 4 bytes are sent, followed by a 2-digit exponential;
Finally, a preset "slow start threshold" is reached, such as 24, which sends 24 groups at a time. The use of the slow start threshold Ssthresh is as follows:
CWnd < Ssthresh, continue to use the slow start algorithm;
CWnd > Ssthresh, stop using the slow start algorithm and use the congestion avoidance algorithm instead;
CWnd = Ssthresh, both the slow-start algorithm and the congestion avoidance algorithm can be used;
The so-called congestion avoidance algorithm is: each through a round trip time RTT will send the sender of the Congestion window +1, that is, the congestion window to increase slowly, in accordance with the linear law growth;
When there is network congestion, such as packet loss , the slow start threshold is set to half, then the CWnd is set to 1, performing the slow start algorithm (lower starting point, exponentially increasing);
Congestion control of TCP