codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Subjects
🌐

Computer Networks

26 chapters

1Network Topologies & LAN/WAN2Network Devices (Hub, Switch, Router)3OSI Reference Model4OSI Model & TCP/IP Suite5TCP/IP Protocol Suite6Switching Techniques (Circuit, Packet)7Data Link: Framing & Error Detection8Error Correction (Hamming Code)9Flow Control (Stop-and-Wait, Sliding Window)10MAC: CSMA/CD & CSMA/CA11Network Layer & Routing12IP Addressing (IPv4, IPv6)13Subnetting & CIDR14Routing Algorithms (Distance Vector, Link State)15ARP, ICMP, and NAT16DHCP Protocol17Transport Layer Services18Transport Layer: UDP19Transport Layer: TCP & 3-Way Handshake20TCP Congestion Control21Application Layer: DNS & HTTP22Application Layer: SMTP & FTP23Socket Programming Basics24Wireless Networks & Wi-Fi Standards25VLANs & Spanning Tree Protocol26Network Security & Cryptography
SubjectsComputer Networks

TCP Congestion Control

Updated 2026-04-29
3 min read

TCP Congestion Control

In the mid-1980s, the Internet experienced its first major "Congestion Collapse." So much data was being pumped into the network that routers couldn't process it all. Routers began dropping packets. Senders, noticing the lost packets, immediately retransmitted them, adding even more traffic to the already overloaded routers. Throughput dropped to near zero.

To prevent the Internet from destroying itself, Van Jacobson implemented Congestion Control into the TCP protocol.

1. Flow Control vs. Congestion Control

It is vital to understand the difference between these two concepts:

  • Flow Control: Protects the Receiver. It ensures a fast sender doesn't overwhelm a slow receiver. (Managed via the TCP Receive Window).
  • Congestion Control: Protects the Network. It ensures a fast sender doesn't overwhelm the routers and switches located in the middle of the Internet. (Managed via a hidden variable called the Congestion Window or cwnd).

The actual amount of data a TCP sender is allowed to transmit without waiting for an acknowledgment is the minimum of the Receive Window and the Congestion Window.

2. AIMD (Additive Increase, Multiplicative Decrease)

TCP probes the network to see how much bandwidth is available. It does this using the AIMD principle:

  • Additive Increase: The sender slowly and steadily increases its transmission rate (adding 1 segment to the cwnd every time an ACK is successfully received).
  • Multiplicative Decrease: The moment a packet is lost, TCP assumes the network is congested. It brutally cuts the transmission rate in half (multiplying cwnd by 0.5).

This creates a characteristic "sawtooth" pattern in TCP throughput graphs. It slowly climbs up until a packet drops, sharply cuts in half, and slowly climbs again.

3. Slow Start

If a client connects to a server to download a file, Additive Increase is too slow. If it starts by sending 1 packet, then 2 packets, then 3 packets, it would take forever to reach a 1-Gigabit connection speed.

Slow Start is an algorithm used at the very beginning of a connection to rapidly find the network's capacity.

  • Despite the name, it is actually an Exponential Increase.
  • The cwnd starts at 1 segment.
  • For every ACK received, the sender increases the cwnd by 1.
  • Because sending 1 packet results in 1 ACK, the next round sends 2 packets. Those 2 result in 2 ACKs, so the window increases by 2 (becoming 4). Then 8, 16, 32...
  • The speed doubles every Round Trip Time (RTT) until it hits a threshold or a packet is lost.

4. Congestion Avoidance

Once the cwnd hits a predefined threshold (called the ssthresh), or a packet is lost, TCP switches from the exponential Slow Start phase to the linear Congestion Avoidance phase (the Additive Increase phase).

If a severe congestion event occurs (detected by a Timeout—meaning the sender waited a very long time and received absolutely no ACKs), TCP assumes the network is completely dead. It cuts the cwnd all the way back down to 1 segment and restarts the entire Slow Start process from scratch.



PreviousTransport Layer: TCP & 3-Way HandshakeNextApplication Layer: DNS & HTTP

Recommended Gear

Transport Layer: TCP & 3-Way HandshakeApplication Layer: DNS & HTTP