Premium experiment • transport flow control

COMPUTER SCIENCE & TECHNOLOGY • NETWORKING

TCP Sliding Window & Flow Control

Step through packet batches, cumulative acknowledgments, one modeled loss, timeout recovery and congestion-window reduction.

● TRANSPORT TIMELINESEQ • ACK • timeout
Event
Cumulative ACK
Effective window
Congestion window

Reasoning inspector

live model state
Timeline event—
Packets in event—
Cumulative ACK—
Receiver window—
Congestion window—
Effective window—
Current limiter—
Dropped sequence—
Recovery events—

Flow control and loss recovery

The sender is limited by both receiver capacity and congestion control. A modeled loss stalls cumulative progress until timeout recovery retransmits the missing sequence.

LEARN WITH THE SIMULATION

Understand TCP Sliding Window & Flow Control by experimenting.

START HERE

TCP uses more than one window because two different constraints matter at the same time. The receiver window rwnd protects receiver buffer capacity, while the congestion window cwnd limits how aggressively the sender injects data into the network. This teaching model sends packet batches using min(rwnd,cwnd), applies one modeled packet loss, stalls cumulative acknowledgment progress, halves cwnd on timeout and retransmits the missing sequence before recovery. The premium inspector exposes which window is actually limiting each event.

BUILD THE IDEA

What you should understand first

  • Distinguish receiver flow control from sender congestion control.
  • Compute the effective send window as the minimum of rwnd and the current cwnd.
  • Track cumulative ACK progress through a sequence containing one modeled loss and timeout.
  • Explain why the active bottleneck can switch after loss even when the receiver advertises the same rwnd.

TRY IT YOURSELF

Can a connection begin receiver-limited and become congestion-limited without changing the receiver window?

  1. Set cwnd larger than rwnd and choose Receiver as the target limiter.
  2. Step through events and verify that min(rwnd,cwnd) initially equals rwnd.
  3. Introduce a packet loss and continue to the timeout event.
  4. Observe the reduced cwnd and identify whether congestion control has become the smaller limit.
Read the visual:

The effective window is determined by whichever constraint is smaller at that moment. Because the model reduces cwnd after the first loss while rwnd stays fixed, the bottleneck can move from receiver flow control to congestion control during recovery.

WHY IT WORKS 01

The sender obeys two independent ceilings

The receiver advertises rwnd to say how much additional unacknowledged data its buffers can accept. The sender's congestion controller maintains cwnd based on its network-congestion model. A sender cannot safely exceed either constraint, so the effective window is min(rwnd,cwnd). The smaller value is the active bottleneck.

WHY IT WORKS 02

Cumulative ACKs represent contiguous progress

A cumulative acknowledgment advances to the highest contiguous sequence range received in order. If one sequence is missing, later arrivals cannot move the cumulative boundary past that gap in the simplified model. That is why one lost packet can stall visible progress even though other packets were transmitted.

WHY IT WORKS 03

Loss can change the bottleneck

The model halves cwnd after its first modeled loss and timeout. rwnd is unchanged, so a connection that was initially receiver-limited can become congestion-limited immediately after the reduction. Later recovery increments cwnd, allowing the limiting side to change again. Following that switch is more informative than looking only at the final ACK.

DO NOT MIX THESE UP

Common misconception

rwnd and cwnd solve different problems and are not interchangeable names for one window. A cumulative ACK does not mean every higher sequence number has independently been acknowledged. This simulator is intentionally compact: it models a timeout-based recovery path and simplified cwnd reduction/recovery, not duplicate ACKs, fast retransmit, selective acknowledgments, RTT estimation, delayed ACKs or a specific modern congestion-control algorithm.

PRACTICE CHALLENGE

Can you make the connection receiver-limited or congestion-limited on demand, then predict whether loss will switch the limiter?

  • Choose a target limiter in the premium controls.
  • Set rwnd and cwnd so the requested window is strictly smaller.
  • Step through the trace and confirm the inspector's effective window.
  • Trigger the modeled loss and explain whether halving cwnd changes the limiting side.
Reveal the reasoning

Before loss, receiver limitation requires rwnd < cwnd and congestion limitation requires cwnd < rwnd. The effective window is their minimum. After the modeled timeout halves cwnd, congestion control may become the bottleneck even if the connection began receiver-limited.

MODEL BOUNDARIES

What this simulation assumes

Every simulation simplifies reality or a mathematical system. These are the assumptions and limits to keep in mind while interpreting the results.

Model assumptions

  • Packets use integer sequence numbers and cumulative acknowledgments in a compact round-based teaching model.
  • The effective send window is min(receiver window, congestion window).
  • One selected packet may be dropped once; timeout halves the congestion window and retransmission resumes from the missing sequence.

Model limitations

  • Fast retransmit, duplicate ACKs, selective acknowledgments, RTT estimation, slow start details and real byte-oriented sequence numbers are omitted.
  • The event trace is designed for conceptual flow-control learning rather than wire-compatible TCP behavior.

CONNECT IT

Where this matters

  • Transport-protocol education
  • Diagnosing flow-control versus congestion-control limits
  • Reasoning about loss recovery and throughput
  • Foundations for TCP performance analysis

WORDS THAT MATTER

Key vocabulary

Receiver window (rwnd)
Flow-control limit advertised by the receiver according to available receive capacity.
Congestion window (cwnd)
Sender-side transmission limit adjusted according to the congestion-control model.
Effective send window
Amount allowed in flight by both mechanisms, modeled here as min(rwnd,cwnd).
Cumulative ACK
Acknowledgment representing contiguous received progress up to a sequence boundary.
Timeout
Loss-recovery event triggered when expected acknowledgment progress does not arrive in time; simplified explicitly in this model.
Retransmission
Sending sequence data again after it is inferred or known to be missing.