2.3. Flow And Congestion

From the application perspective, an individual data packet is not the most suitable unit of communication. An application may need to exchange large messages or continuous streams, both of which need to be split into multiple data packets. While the splitting is simple by itself, exchanging large messages or continuous streams emphasizes need for both flow control and congestion control.

The role of flow control is to guarantee that the sender will not send data packets faster than the recipient is able to process them. A simple solution to flow control is defining a flow control window as a number or size of data packets that the recipient is able to process. The size of the flow control window is communicated to the sender in acknowledgement messages.

The role of congestion control is to guarantee that the sender will not send data packets faster than the network is able to transport them. A simple solution to congestion control is defining a congestion control window as a number or size of data packets that the network is able to transport. The size of the congestion control window is adjusted by the sender in response to events that indicate presence or absence of congestion, such as packet delivery or packet loss.