← 🚚 Transport Layer: UDP & TCP
Subtopic 3 of 4

7.3TCP congestion control

The idea

TCP controls how fast it sends with the congestion window cwnd. It starts small, doubles every RTT in slow start, then grows by one MSS per RTT, and cuts back when it sees loss.

Think of it like this: Merging into traffic: you start slowly, speed up fast, then creep up once you feel resistance, and brake hard when you hit a jam.

Why it exists

Computing the window after k RTTs is one of the most repeated transport numericals.

How it works

  1. Start cwnd = 1 MSS. Below ssthresh: double each RTT.
  2. At or above ssthresh: +1 MSS per RTT.
  3. Timeout: ssthresh = cwnd/2, cwnd = 1 MSS.
  4. Three duplicate ACKs: Tahoe as a timeout; Reno sets cwnd = ssthresh = cwnd/2.

Worked example: cwnd = 12 MSS when a timeout occurs. What is cwnd in the third RTT afterwards?

ssthresh = 6, cwnd 1 → 2 → 4 (slow start; GATE 2024).

Now play with it

  • →Set the timeout at RTT 8 with ssthresh 8 and read the table.
  • →Switch Tahoe to Reno for the triple duplicate ACK.
120 RTTs12cwnd (MSS)
RTTcwndssthreshphaseevent after this RTT
118slow start
228slow start
348slow start
488congestion avoidance
598congestion avoidance
6108congestion avoidance
7118congestion avoidance
8128congestion avoidancetimeout: ssthresh = 6, cwnd = 1
916slow start
1026slow start
1146slow start
1266congestion avoidance
1376congestion avoidance
1486congestion avoidance3 dup ACKs (Reno): ssthresh = cwnd = 4
1544congestion avoidance
1654congestion avoidance
1764congestion avoidance
1874congestion avoidance
1984congestion avoidance
2094congestion avoidance

Start at 1 MSS. Below ssthresh the window doubles every RTT (slow start); at or above it grows by 1 MSS per RTT (congestion avoidance). Timeout: ssthresh = cwnd/2 and cwnd = 1. Three duplicate ACKs: Tahoe restarts at 1, Reno halves and continues (fast recovery).

Check yourself

A TCP sender has cwnd = 20 MSS when a timeout occurs. The new ssthresh and cwnd are

Remember: Slow start doubles per RTT; avoidance +1 per RTT; timeout ssthresh = cwnd/2 and cwnd = 1.
Exam notes (the dense version)

The sender keeps cwnd and sends min(cwnd, rwnd). Slow start: cwnd starts at 1 MSS and doubles every RTT (+1 MSS per ack) until it reaches ssthresh. Congestion avoidance: +1 MSS per RTT (AIMD, additive increase). On a timeout: ssthresh = cwnd/2, cwnd = 1 MSS, back to slow start. On 3 duplicate ACKs: Tahoe acts as for a timeout; Reno halves (ssthresh = cwnd = cwnd/2) and uses fast recovery. Time to climb back: count RTTs, one per doubling or +1 step.

Previous year questions: Transport Layer: UDP & TCP (11)

PYQs are grouped by topic, so this is the full set for Transport Layer: UDP & TCP; try the ones that match this subtopic. Open all 11 on the topic page.