Communication Networks · Visualized

Selective Repeat

Transport Reliability

TCP connections, retransmission timers and sliding windows that make lossy links behave.

6 interactive subtopics — each one animated, step-through and explained.

Selective Repeat

Transport Reliability

Selective Repeat upgrades reliability economics: the receiver buffers out-of-order frames instead of discarding them and individually acknowledges each one. Only genuinely lost frames are retransmitted, then the buffer releases everything in order. Maximum efficiency, at the cost of buffering and bookkeeping on both sides.

How Selective Repeat Works

  1. Sender keeps a timer per outstanding frame; window of N spans [base, base+N−1].
  2. Receiver accepts any in-window frame and buffers it, marking holes explicitly.
  3. Every correctly received frame gets an individual ACK.
  4. A hole (timeout on that one frame) triggers retransmission of just that frame.
  5. Once the hole fills, buffered frames flush upward in order and both windows slide together.

Selective Repeat Worked Example

Try it: Play — frame 2 vanishes while 3 lands in the receive buffer; only frame 2 is ever resent, then 2·3·4 deliver together.

Compare with Go-Back-N on the same loss: here exactly one frame crosses the wire twice. The receive-buffer strip shows held frames waiting for the gap to close.

sender window01234567receive buffer — holds instead of binning········
ACKed buffered at receiver in flight window
Stage 1 / 13
Same window of 4 — but this receiver BUFFERS out-of-order frames instead of binning them.

Selective Repeat: Key Facts to Remember

Efficiencyoptimal retransmissions — the theoretical benchmark for ARQ
Buffersreceiver must hold N frames; sender a timer per frame
In practiceTCP SACK + fast retransmit approximate Selective Repeat behaviour

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses

See how packets really travel

Networks are built on the structures and algorithms you can watch step by step — queues, trees, and routing algorithms.