What is the TCP Flow Control mechanism?

Overview

TCP Flow Control is a protocol designed to manage the data flow between the user and the server. It ensures that there is a specific bandwidth for sending and receiving data so the data can be processed without facing any major issues. In order to achieve this, the TCP protocol uses a mechanism called the sliding window protocol.

widget

The sliding window protocol

In the sliding window protocol method, when we are establishing a connection between sender and receiver, there are two buffers created. Each of these two buffers are assigned to the sender, called the sending window, and to the receiver, called the receiving window.

When the sender sends data to the receiver, the receiving window sends back the remaining receiving buffer space. As a result, the sender cannot send more data than the available receiving buffer space. We’ll understand the concept better once we take a look at the illustration below:

Sliding window protocol

Explanation

In this example, the sending window sends data to the receiving window. The receiving window sends the acknowledgment after receiving the data and then the sending window sends another data frame.

However, this time, along with the received acknowledgment, the receiving window also sends another message saying that the available memory is full.

The sending window pauses the transmission of data until it gets the acknowledgment of the receiving window that space has been released and it can continue the transmission process.

Copyright ©2024 Educative, Inc. All rights reserved