The Wayback Machine - https://web.archive.org/web/20240715072512/https://www.geeksforgeeks.org/congestion-control-in-computer-networks/
Open In App

Congestion Control in Computer Networks

Last Updated : 28 Jun, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Congestion control is a crucial concept in computer networks. It refers to the methods used to prevent network overload and ensure smooth data flow. When too much data is sent through the network at once, it can cause delays and data loss. Congestion control techniques help manage the traffic, so all users can enjoy a stable and efficient network connection. These techniques are essential for maintaining the performance and reliability of modern networks.

What is Congestion?

Congestion in a computer network happens when there is too much data being sent at the same time, causing the network to slow down. Just like traffic congestion on a busy road, network congestion leads to delays and sometimes data loss. When the network can’t handle all the incoming data, it gets “clogged,” making it difficult for information to travel smoothly from one place to another.

Effects of Congestion in Computer Network

  • Improved Network Stability: Congestion control helps keep the network stable by preventing it from getting overloaded. It manages the flow of data so the network doesn’t crash or fail due to too much traffic.
  • Reduced Latency and Packet Loss: Without congestion control, data transmission can slow down, causing delays and data loss. Congestion control helps manage traffic better, reducing these delays and ensuring fewer data packets are lost, making data transfer faster and the network more responsive.
  • Enhanced Throughput: By avoiding congestion, the network can use its resources more effectively. This means more data can be sent in a shorter time, which is important for handling large amounts of data and supporting high-speed applications.
  • Fairness in Resource Allocation: Congestion control ensures that network resources are shared fairly among users. No single user or application can take up all the bandwidth, allowing everyone to have a fair share.
  • Better User Experience: When data flows smoothly and quickly, users have a better experience. Websites, online services, and applications work more reliably and without annoying delays.
  • Mitigation of Network Congestion Collapse: Without congestion control, a sudden spike in data traffic can overwhelm the network, causing severe congestion and making it almost unusable. Congestion control helps prevent this by managing traffic efficiently and avoiding such critical breakdowns.

Congestion Control Algorithm

  • Congestion Control is a mechanism that controls the entry of data packets into the network, enabling a better use of a shared network infrastructure and avoiding congestive collapse. 
  • Congestive-avoidance algorithms (CAA) are implemented at the TCP layer as the mechanism to avoid congestive collapse in a network.
  • There are two congestion control algorithms which are as follows: 

Leaky Bucket Algorithm

  • The leaky bucket algorithm discovers its use in the context of network traffic shaping or rate-limiting. 
  • A leaky bucket execution and a token bucket execution are predominantly used for traffic shaping algorithms.
  • This algorithm is used to control the rate at which traffic is sent to the network and shape the burst traffic to a steady traffic stream.
  • The disadvantages compared with the leaky-bucket algorithm are the inefficient use of available network resources.
  • The large area of network resources such as bandwidth is not being used effectively.

Let us consider an example to understand Imagine a bucket with a small hole in the bottom. No matter at what rate water enters the bucket, the outflow is at constant rate. When the bucket is full with water additional water entering spills over the sides and is lost.

Leaky Bucket

Similarly, each network interface contains a leaky bucket and the following steps are involved in leaky bucket algorithm:

  • When host wants to send packet, packet is thrown into the bucket.
  • The bucket leaks at a constant rate, meaning the network interface transmits packets at a constant rate.
  • Bursty traffic is converted to a uniform traffic by the leaky bucket.
  • In practice the bucket is a finite queue that outputs at a finite rate. 

To learn more about Leaky Bucket Algorithm please refer the article.

Token Bucket Algorithm

  • The leaky bucket algorithm has a rigid output design at an average rate independent of the bursty traffic.
  • In some applications, when large bursts arrive, the output is allowed to speed up. This calls for a more flexible algorithm, preferably one that never loses information. Therefore, a token bucket algorithm finds its uses in network traffic shaping or rate-limiting.
  • It is a control algorithm that indicates when traffic should be sent. This order comes based on the display of tokens in the bucket. 
  • The bucket contains tokens. Each of the tokens defines a packet of predetermined size. Tokens in the bucket are deleted for the ability to share a packet.
  • When tokens are shown, a flow to transmit traffic appears in the display of tokens.
  •  No token means no flow sends its packets. Hence, a flow transfers traffic up to its peak burst rate in good tokens in the bucket.

To learn more about Token Bucket Algorithm please refer the article.

Need of Token Bucket Algorithm

The leaky bucket algorithm enforces output pattern at the average rate, no matter how bursty the traffic is. So in order to deal with the bursty traffic we need a flexible algorithm so that the data is not lost. One such algorithm is token bucket algorithm.

Steps of this algorithm can be described as follows:

  • In regular intervals tokens are thrown into the bucket. ƒ
  • The bucket has a maximum capacity. ƒ
  • If there is a ready packet, a token is removed from the bucket, and the packet is sent.
  • If there is no token in the bucket, the packet cannot be sent.

Let’s understand with an example, In figure (A) we see a bucket holding three tokens, with five packets waiting to be transmitted. For a packet to be transmitted, it must capture and destroy one token. In figure (B) We see that three of the five packets have gotten through, but the other two are stuck waiting for more tokens to be generated.

Token Bucket vs Leaky Bucket

The leaky bucket algorithm controls the rate at which the packets are introduced in the network, but it is very conservative in nature. Some flexibility is introduced in the token bucket algorithm. In the token bucket algorithm, tokens are generated at each tick (up to a certain limit). For an incoming packet to be transmitted, it must capture a token and the transmission takes place at the same rate. Hence some of the busty packets are transmitted at the same rate if tokens are available and thus introduces some amount of flexibility in the system.

Formula: M * s = C + ? * s where S – is time taken M – Maximum output rate ? – Token arrival rate C – Capacity of the token bucket in byte

Let’s understand with an example,
 
image0031
Link to question on leaky bucket algorithm: https://www.geeksforgeeks.org/computer-networks-set-8/

Advantages

  • Stable Network Operation: Congestion control ensures that networks remain stable and operational by preventing them from becoming overloaded with too much data traffic.
  • Reduced Delays: It minimizes delays in data transmission by managing traffic flow effectively, ensuring that data packets reach their destinations promptly.
  • Less Data Loss: By regulating the amount of data in the network at any given time, congestion control reduces the likelihood of data packets being lost or discarded.
  • Optimal Resource Utilization: It helps networks use their resources efficiently, allowing for better throughput and ensuring that users can access data and services without interruptions.
  • Scalability: Congestion control mechanisms are scalable, allowing networks to handle increasing volumes of data traffic as they grow without compromising performance.
  • Adaptability: Modern congestion control algorithms can adapt to changing network conditions, ensuring optimal performance even in dynamic and unpredictable environments.

Disadvantages

  • Complexity: Implementing congestion control algorithms can add complexity to network management, requiring sophisticated systems and configurations.
  • Overhead: Some congestion control techniques introduce additional overhead, which can consume network resources and affect overall performance.
  • Algorithm Sensitivity: The effectiveness of congestion control algorithms can be sensitive to network conditions and configurations, requiring fine-tuning for optimal performance.
  • Resource Allocation Issues: Fairness in resource allocation, while a benefit, can also pose challenges when trying to prioritize critical applications over less essential ones.
  • Dependency on Network Infrastructure: Congestion control relies on the underlying network infrastructure and may be less effective in environments with outdated or unreliable equipment.

Conclusion

Congestion control is essential for keeping computer networks running smoothly. It helps prevent network overloads by managing the flow of data, ensuring that information gets where it needs to go without delays or loss. Effective congestion control improves network performance and reliability, making sure that users have a stable and efficient connection. By using these techniques, networks can handle high traffic volumes and continue to operate effectively.

Frequently Asked Question on Congestion Control – FAQs

Why is congestion control important?

Congestion control is important because it helps prevent network overload, ensuring smooth and efficient data flow. This keeps the network stable and reliable for all users.

How does congestion affect network performance?

When a network is congested, data packets can get delayed, lost, or need to be retransmitted, leading to slower speeds and reduced overall performance.

What is TCP congestion control?

TCP congestion control is a set of algorithms used by the Transmission Control Protocol (TCP) to manage data flow and prevent congestion in a network. It adjusts the rate of data transmission based on network conditions.

How do routers help in congestion control?

Routers help by managing data packet queues, prioritizing important data, and using algorithms to prevent congestion. They can also send signals to devices to slow down their data transmission if the network is getting overloaded.



Previous Article
Next Article

Similar Reads

Congestion Control techniques in Computer Networks
Congestion control refers to the techniques used to control or prevent congestion. Congestion control techniques can be broadly classified into two categories: Open Loop Congestion Control Open loop congestion control policies are applied to prevent congestion before it happens. The congestion control is handled either by the source or the destinat
5 min read
Difference between Flow Control and Congestion Control
Flow Control and Congestion Control are traffic controlling methods for different situations. The main difference between flow control and congestion control is that, In flow control, rate of traffic received from a sender can be controlled by a receiver. On the other hand, In congestion control, rate of traffic from sender to the network is contro
4 min read
What is DCCP (Datagram Congestion Control Protocol)?
Congestion in a network means deterioration of network or services which are caused due to overloading of network nodes, basically, this problem is primarily associated with large networks, in which a large amount of data and information is being transmitted. Congestion can be caused by several reasons: either the routers which are being used are n
6 min read
Congestion Control in Datagram Subnets
In this article, we will discuss different approaches to Congestion control in the data-gram subnet. Also, we will discuss the drawback and will explain each approach in detail. Let's discuss them one by one. Pre-requisite -Congestion control Congestion control in data-gram and sub-nets :Some congestion Control approaches which can be used in the d
4 min read
Slow Start Restart Algorithm For Congestion Control
Once a connection is established between client and server, the sender sends the data to the receiver in form of packets. If the network is congested then packets get dropped. This happens when the buffer of intermediaries devices such as Router is filled. TCP sender has to detect whether it has filled up ‘buffers at the intermediate devices’, and
5 min read
TCP Congestion Control Algorithms: Reno, New Reno, BIC, CUBIC
TCP (Transmission Control Protocol) congestion control algorithms are important for dealing with network congestion and ensuring green information switches over the Internet. Several congestion control algorithms have been developed through the years to deal with specific aspects of community conduct. Here's a top-level view of the noted algorithms
15 min read
When To Use Congestion Control?
Answer: Congestion control is used in computer networks when the volume of data traffic exceeds the capacity of the network, leading to congestion and degradation of performance. It's employed to regulate the flow of data, prevent network collapse, and ensure fair access to network resources for all users.Congestion control guarantees that all comm
2 min read
TCP Congestion Control
TCP congestion control is a method used by the TCP protocol to manage data flow over a network and prevent congestion. TCP uses a congestion window and congestion policy that avoids congestion. Previously, we assumed that only the receiver could dictate the sender’s window size. We ignored another entity here, the network. If the network cannot del
4 min read
Access Control Tactics in Computer Networks
Discretionary Access Control: Discretionary Access Control grants or restricts object access determined by the object’s owner. Controls are discretionary because an object owner with certain access permissions can pass on those permissions to another subject. In systems that utilize discretionary access controls, the owner of an object can choose w
2 min read
What is Network Congestion? Common Causes and How to Fix Them?
Network Congestion occurs when the traffic flowing through a network exceeds its maximum capacity. In most cases, congestion is a temporary issue with the network caused due to a sudden upsurge of traffic, however, sometimes, a network is continually congested, indicating a deeper problem. End-users perceive network congestion as Network Slowdown o
5 min read