AlgoViz

Acknowledgments, windows and retransmission

medium 7 min

TCP numbers bytes and acknowledges the next contiguous byte expected.

Video lesson · Chapter 1 of 4

A receiver with no space left

0:00 / 2:03

Theory

Read or listen first. About 2 min.

What it is

TCP numbers bytes and acknowledges the next contiguous byte expected. Out-of-order segments can be buffered and reported with SACK. Flow control bounds data the receiver can hold, while congestion control bounds data the network can carry. The sender must respect both windows, so either can constrain throughput.

Why it exists

A transfer stops with few losses and a quiet link. At the moment progress stops, the receiver advertises zero available window. Its application is busy elsewhere and has stopped draining the socket. Confirm the queue and consumer rate on the receiving side. Increasing sender concurrency would only offer more work to the same bottleneck.

An open receive window shifts attention to congestion allowance, delivery losses and sender application pacing.

A receiver with no space left

Sender → Consumer (send stream bytes). Consumer → Advertised window (free buffer space). Advertised window → Sender (advertise allowance)
Sender → Consumer (send stream bytes). Consumer → Advertised window (free buffer space). Advertised window → Sender (advertise allowance)

Inside this chapter

Sequence and Acknowledgement Numbers
TCP counts stream bytes. An acknowledgment identifies the next contiguous byte expected. One cumulative ACK can acknowledge several earlier segments.
TCP Sliding Windows
A sliding window permits multiple bytes in flight. The window advances as data is acknowledged. Useful throughput depends on available window relative to round-trip time.
Flow Control and Window Scaling
The advertised receive window protects receiver buffer space. Scaling allows a larger range. A slow application can keep this window small regardless of network capacity.
Retransmission Timeouts (RTO)
The retransmission timeout derives from measured RTT and variability under protocol rules. A timeout triggers recovery but does not identify exactly which device lost the data.
Selective Acknowledgments (SACK)
SACK tells the sender which noncontiguous byte ranges arrived. It helps target retransmissions while cumulative acknowledgment still tracks the contiguous prefix.
Fast Retransmit and Fast Recovery
Duplicate acknowledgments can provide evidence of a gap before the retransmission timer expires. Recovery behavior depends on the active TCP algorithm and observed delivery.
Duplicate ACKs and Out-of-Order Packets
Reordering can generate repeated acknowledgment numbers even without permanent loss. Correlate sequence progress and later arrivals before counting every duplicate ACK as a lost packet.

How it works

Step through the idea, or press Play.

Step 1 of 4

Advertise space. A receiver announces how many further bytes its buffering permits.

Understand it

Worked incident

A receiver with no space left

ObservationAdvertised receive window (KiB)Interpretation
Baseline128The consumer drains bytes as fast as they arrive.
Incident0The receive buffer fills and the advertised window closes.
After intervention96Resume the consumer and observe a fresh window update followed by forward progress.
Illustrative measurements from the same workload at three checkpoints.

Choose the next investigation

An open receive window shifts attention to congestion allowance, delivery losses and sender application pacing.

Summary

The whole topic in one minute.

A receiver can intentionally advertise no space. Lost-byte recovery and receiver backpressure are different mechanisms.

An open receive window shifts attention to congestion allowance, delivery losses and sender application pacing.

Sources