What if you could send many messages at once without losing track or overwhelming your friend?
Why TCP flow control (sliding window) in Computer Networks? - Purpose & Use Cases
Imagine you are sending a long letter to a friend by passing notes through a chain of people. You can only send one note at a time and must wait for your friend to confirm they received it before sending the next. This makes the whole process very slow.
Sending one note at a time means you spend a lot of time waiting. If your friend is slow to reply or busy, you can't send more notes, causing delays. Also, if you send too many notes without checking, your friend might get overwhelmed and lose some notes.
TCP flow control with sliding window lets you send multiple notes at once without waiting for each confirmation. You keep track of how many notes your friend can handle and adjust the number you send accordingly. This keeps the flow smooth and avoids overwhelming your friend.
send(note1) wait_for_ack() send(note2) wait_for_ack()
window_size = 5 send(notes[0:window_size]) while not all_acked: receive_acks() slide_window()
It enables efficient and reliable data transfer by balancing speed and safety, so networks run smoothly without losing information.
When you stream a video online, TCP flow control helps your device receive data fast without getting overwhelmed, so the video plays without pauses or glitches.
Manual one-by-one sending is slow and inefficient.
Sliding window allows multiple packets to be sent before waiting for acknowledgments.
This balances network speed and reliability for smooth communication.