Search code examples
congestion-control

Congestion control is network phenomenon , then why and how this is handled on transport layer.?


Congestion control is network phenomenon , then why and how this is handled on transport layer. Congestion occurs among the intermediary devices (router) in the network. But yesterday i was reading a paper (Host-to-Host Congestion Control for TCP, Alexander Afanasyev, Neil Tilley, Peter Reiher, and Leonard Kleinrock) . Here as we can see the title, Host-to-Host Congestion Control. So moreover, i want to ask , If congestion occur among the network , So it is the duty of network layer to control it, but we can see, transport layer controlling it. ? how ? how does transport layer know that congestion occurred among the network. ?


Solution

  • The transport layer is the end-to-end connection for applications. TCP, a transport layer protocol, can guess there is congestion because it needs to provide guaranteed delivery and out of order packet reassembly. TCP has a few mechanisms to slow packet delivery when it suspects congestion based on lost packets. On the other hand, UDP, another transport layer protocol, is completely clueless about such things since it is a fire-and-forget, best-effort protocol which has no expectations that a sent packet will arrive at its destination, and the destination has no clue that a packet may be coming.

    From a layer-3 perspective, congestion control is achieved with QoS. Packet marking and classification, priorities, buffering, queuing, shaping, policing, RED, etc., some or all of which can be used to try to strike a balance of fairness as determined by the network designer.

    For instance, when buffers get full, they just start dropping new traffic which is destined for the buffer. This can cause many problems in the network. Random Early Detection (RED) can help by using features of TCP. RED will randomly drop queued packets to prevent the buffers from filling, and TCP flows will adjust themselves to slow down packet delivery, helping to prevent full buffers.

    Smaller packet sizes could be served first, allowing more packets to flow through an interface instead of making many small packets wait on the relatively lengthy serialization of a few large packets.

    QoS is a huge topic which can't be properly addressed here, but it sounds like a subject you should research.