Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

tcp flow control
tcp
networking

What is the TCP Flow Control mechanism?

Mohe Ud Din Sheikh

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

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.

RELATED TAGS

tcp flow control
tcp
networking

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring