edited by
2,252 views
1 votes
1 votes
Isn't the flow control mechanism helping to prevent congestion in the network ?

I am not getting how there is congestion at process end , if we say that buffer size is full and the sender is still sending the packet , then that comes under flow control mechanism .

I have gone through web links but there I am not getting the basic insight as to how congestion control is not related to flow control or how is it different from flow control mechanism because even if the sender is not overwhelming the receiver , congestion would not occur , even if it occurs , it will occur at the network portion , which has nothing to do with $TCP$ congestion control mechanism .

 

Please explain precisely .
edited by

1 Answer

Best answer
0 votes
0 votes

Flow control mechanism is to prevent sender from overwhelming the receiver. It controls the rate of sending packets by a sender through a buffer (window) maintained at sender side. This window moves to next set of packet(s) only when an acknowledgement is received from the receiver.

So, basically it works this way:

  • Sender has a window of size N, while receiver has a window of size 1 (For simplicity we are considering Go Back to N). Sender Window was Packets number $#1, #2... #N$
  • Sender sends $Packet #1, Packet #2 ... Packet #N$ to the receiver and waits for ACK.
  • When senders gets ACK for Packet #1, it shifts a window to $Packet #2, Packet #3.. Packet #N + 1$
  • When senders gets ACK for Packet #2, it shifts a window to $Packet #3, Packet #4.. Packet #N + 2$
  • The process goes on

So, sender wants for receiver to ACK the packet so that it is not overwhelmed with lot of packets being sent to the receiver. That is the whole idea behind this mechanism that a faster sender must not overwhelm a slow receiver

Internet as a whole can be considered a Queue of Packets. There are nodes which are putting packets and there are nodes which are picking packets from this queue. If there are too many nodes putting packets then what can be picked up from the queue by the nodes, then this degrades performance and is known as congestion. There can be several reasons for this congestion like bursty traffic, slow processing at nodes (routers).. etc. When congestion occurs, the routers drop the packets as they are unable to cope up with the flow. This means that when a device sends a packet and does not receive an acknowledgment from the receiver, in most the cases it can be assumed that the packets have been dropped by intermediate devices due to congestion. Remember that in case of Flow Control mechanism, it would retransmit the packets again to the sender, at the same rate (whatever amount of packets are in window). This would only cause more harm to the situation, right ?

While there are several methods to control this congestion in the network like Leaky Bucket, Token Bucket, but for for now, would only talk about TCP Congestion control mechanism. It works by setting the size of amount of data to be sent equal to the Maximum Segment Size (Negotiated during connection establishment). When an ACK is received for this segment, the maximum size of data that can now be sent is set to 2 MSS. When ACK is received for this, then the size of data that can now be sent is set to 4 MSS .. and so on. This keeps on doubling till a threshold is reached. If the ACK is not received, and the timer times out waiting for ACK, then the maximum size of data that can be sent is set to 1 MSS and the threshold is to half the size of maximum data which was last sent. This is called TCPs Additive Increase Multiplicative Decrease (AIMD).

Summary:

So, while flow control is used to stop sender from overwhelming the receiver, the congestion control is used to dynamically control the flow of packets sent from sender to receiver so that the network as a whole remain within its carrying capacity.

selected by

Related questions

2 votes
2 votes
1 answer
2
Markzuck asked Jan 10, 2019
908 views
here TOTAL 2000 segments need to be sent, and after x RTT, it will send 2001 segments but for total we shall take count of addition of all the previous also na?
2 votes
2 votes
2 answers
3
Markzuck asked Jan 7, 2019
946 views
Please help, I am getting total number of transmission to get BACK TO 38 as 14 and NOT 15.after 14th, it would have became 38, so no need to consider 15th segment right?