How congestion is controlled in TCP?
One of the most significant aspects of TCP is a mechanism for congestion control. In main modern internets, extreme long delays or packet loss are more probable to be caused through congestion than a hardware failure.
Interestingly, transports protocols which retransmit can exacerbate the problem of congestion through injecting further copies of a message.
To ignore such a problem, TCP all the time uses packet loss as a measure of congestion and responds to congestion through reducing the rate at that it retransmits data.
TCP doesn't compute a specific transmission rate. In place, TCP bases transmission on buffers. It is the receiver advertises a window size and the sender can transmit data to fill the receiver's window before received an ACK. To control the data rate, TCP inflicts a restriction on the window size - through temporarily reducing the window size, the sending TCP effectively decreases the data rate.
TCP congestion control takes over while a message is lost. In place of retransmitting adequate data to fill the receiver's buffer as the receiver's window size, TCP starts through sending a particular message having data. If the acknowledgement arrives without any additional loss, TCP doubles the amount of data to be sent and sends two additional messages. TCP sends four more and the rest, if acknowledgement arrives for those two.