Congestion Control

Work in progress. This note is still being written and incomplete.

Congestion - offered traffic exceeds available router, link, or processing capacity.

  • Packet arrivals initially queue.
  • Persistent overload causes packet drops.
  • Drops and delay trigger retransmissions.
  • Retransmissions increase offered load.

Congestion Control and Flow Control

Flow control - prevents a sender from overloading one receiver.

Congestion control - prevents overload across routers and links.

PropertyFlow controlCongestion control
ScopeSender and receiver.Network path.
ObjectiveReceiver protection.Throughput and delay control.
SignalReceiver window.Loss, delay, marks, or router feedback.

Control Models

Open-loop control - policies fixed without current network state.

  • Example
    Limit VoIP calls per link.
  • Prevention-oriented.

Closed-loop control - detect congestion, report it, then adapt operation.

Detection and Feedback

Router indicators:

  • Packet-drop rate.
  • Queue length.
  • Link utilisation.

Endpoint indicators:

  • Retransmission timeout.
  • Increased packet delay.

Feedback methods:

  • Send a control packet to the source or previous router.
  • Mark a packet travelling to the receiver.
  • Let the receiver report the mark to the sender.

Congestion Avoidance in Transport Layer

TCP Congestion Window

Congestion window - sender-side limit on unacknowledged bytes.

Advertised window - receiver-side limit on unacknowledged bytes.

TCP treats loss as congestion because transmission errors are rare.

Additive Increase, Multiplicative Decrease

During congestion avoidance:

CongestionWindowCongestionWindow+MSS2CongestionWindowCongestionWindow \leftarrow CongestionWindow + \frac{MSS^2}{CongestionWindow}

per acknowledged segment. This increases CongestionWindowCongestionWindow by approximately one Maximum-Segment-Size (MSSMSS) per Round-Trip-Transmission (RTT).

After a timeout:

CongestionWindow1 MSSCongestionWindow \leftarrow 1\ MSS

The congestion threshold becomes half the prior usable window.

Slow Start

Exponential window growth.

Congestion window Transmission number 1 MSS Timed out transmissions
  • Start at CongestionWindow=1 MSSCongestionWindow = 1\ MSS.
  • Increase CongestionWindowCongestionWindow by one MSSMSS for every ACK.
  • Window approximately doubles each RTT.
  • Use at connection start and after a timeout.

A timeout returns the window to 1 MSS1\ MSS. Slow start then repeats.

TCP Linear Increase Threshold

Slow-start threshold (ssthreshssthresh) - the congestion window where exponential slow-start growth changes to linear congestion-avoidance growth.

Congestion window Round-trip transmissions 40 18 1 MSS ssthresh new ssthresh Slow start Congestion avoidance Timeout
  • Initial ssthreshssthresh: 64KB64\text{KB}.
  • Initial CongestionWindowCongestionWindow: 1 MSS1\text{ MSS}.
  • While CongestionWindow<ssthreshCongestionWindow < ssthresh: increase CongestionWindowCongestionWindow by 1 MSS1\text{ MSS} for every ACK.
  • After each RTT below ssthreshssthresh: CongestionWindowCongestionWindow approximately doubles.
  • When CongestionWindowssthreshCongestionWindow \ge ssthresh: increase CongestionWindowCongestionWindow by approximately 1 MSS1\text{ MSS} per RTT.
  • After a timeout
    Reset CongestionWindowCongestionWindow to 1 MSS1\text{ MSS}. Set ssthreshssthresh to half the previous usable window.

The usable window is the smaller of the congestion window and the advertised receiver window.

Fast Retransmit and Fast Recovery

Duplicate ACKs indicate that a segment arrived out of order.

  • Three duplicate ACKs trigger fast retransmit.
  • Retransmit the missing segment before timeout expiry.
  • Set ssthreshssthresh to half the previous cwndcwnd.
  • Fast recovery resumes near ssthreshssthresh.
  • Slow start is skipped.

TCP Vegas

Host-centric congestion avoidance.

  • Detects increasing RTT or a flattening sending rate.
  • Infers queue growth before packet loss.
  • Reduces the sending rate before overflow.

Router-Assisted Congestion Avoidance

Random Early Detection (RED)

Active queue management using average queue length.

  • Low average queue
    Accept packets.
  • Rising average queue
    Randomly drop packets with increasing probability.
  • Full queue
    Drop all arriving packets.

Early drops signal TCP before queue overflow.

Explicit Congestion Notification (ECN)

Congestion signal encoded in packet headers.

  • Router marks packets instead of dropping them.
  • Receiver returns the congestion indication.
  • Sender reduces its rate.

Congestion Avoidance in Network Layer

Resource Preallocation

Reserve buffers and bandwidth before data transmission.

  • Common in virtual-circuit networks.
  • Setup selects a path and allocates resources.
  • The network rejects calls lacking sufficient resources.

Traffic Shaping

Control the transmission rate and pattern.

  • Sender and carrier negotiate a traffic profile during setup.
  • Leaky-bucket shaping enforces a steady output rate.

Choke Packets

Router notification instructing a sender to reduce its rate.

Isarithmic Control

Cap the total packets within a subnet.

  • A router needs a permit before injecting a packet.
  • The permit count limits in-network packets.

Virtual Circuits and Datagrams

Virtual-circuit subnets use:

  • Admission control.
  • Alternative routes for new circuits.
  • Reservation during circuit setup.

Datagram subnets discard packets when resources are unavailable. The sending host retransmits dropped datagrams. In virtual circuits, the previous-hop router retransmits after missing acknowledgement.

  • Retransmission policy
  • Out-of-order caching policy
  • Packet discard policy
  • Load Shedding
  • Jitter Control

Load Shedding

Intentional packet discard during congestion.

Discard policies:

  • Oldest packet.
  • Newest packet.
  • Low-priority packet.
  • Random early discard.

Jitter Control

Jitter - variation in packet-delay / packet inter-arrival-time.

  • Prioritise time-critical packets in router queues.
  • Use receiver buffering to mask remaining variation.
Written by September 16, 2026 4 min read
Was this helpful?