KomuraSoft LLC
Chapter 7

Case studies — Reading TCP behavior from the packet's point of view

Triage eight cases modeled on real incident investigations in the order symptom → which promise is involved → which numbers to check. When stuck, return to the corresponding chapter and review.

The final eight — translating symptoms into "which promise is this about?"

The last chapter is pure exercise, no new lessons. You answer eight cases modeled on real incident investigations, drawing on all six chapters. When in doubt, come back to this course's motto — which promise is being broken right now: delivery, ordering, or pacing? Then translate the symptom into numbers: RST or silence? Where does the duplicate ACK's number point? Which window is taking the min?

If you get stuck onGo back to
IP's properties, the TCP/UDP division of labor, the 4-tupleChapter 1
The handshake, TIME_WAIT, RST vs. FINChapter 2
seq/ack arithmetic, RTO, duplicate ACKs and fast retransmitChapter 3
Window advertisements, in-flight, window ÷ RTT, zero windowChapter 4
cwnd, slow start, the two-grade response to lossChapter 5
Byte streams, framingChapter 6
A TCP troubleshooting map tracing three symptom families — cannot connect, slow, and data looks wrong — to the packet evidence to check and the corresponding chapters

The triage map this course built. Descend in the order symptom → packet evidence → which promise is involved, and you graduate from guesswork restarts.

Case 7-1 — Cannot connect, or the connection drops

Chapters 1–2 territory. Translate each case into 'immediate refusal or silence?' and 'FIN or RST?'

Q1. Case: clients cannot connect to a freshly deployed API server. Client A gets Connection refused immediately; client B waits 30 seconds and then hits a connection timeout. Which reading of the two situations is correct?

Q2. Case: on a proxy server opening masses of short-lived connections to backends via a load balancer, netstat shows tens of thousands of connections in TIME_WAIT. Which understanding is correct?

Q3. Case: a long-lived database connection was killed with an RST the moment a nightly batch sent its first query in hours. Nothing abnormal happened between establishment and the idle period. What is the most likely cause?

Case 7-2 — Slow, or stalling

Chapters 3–5 territory. Translate into 'which kind of retransmission?' and 'which window is taking the min?'

Q4. Case: a transfer is reported slow, and the capture shows masses of ACKs with the same ack number. The receiver has received contiguously up to byte 8000; only the segment 8001–9000 was lost, and everything after it (9001 onward) keeps arriving. What is the ack number on the lined-up duplicate ACKs?

Q5. Case: file transfer to an overseas office (RTT 50 ms) over a dedicated 1 Gbps line (= 125 MB/s) reaches only 4 MB/s. Investigation finds the receiver configured with a window fixed at 200 KB (200,000 bytes). What is the throughput ceiling, in MB/s, under this setting? (1 MB = 1,000,000 bytes)

MB/s

Q6. Case: transfers to a log-collection server stall periodically. The capture shows the receiver advertising window 0 and the sender repeating small query packets. Where should you look next?

Case 7-3 — The data looks wrong

Chapter 6 territory. Look for 'what did we assume that lies outside TCP's promises?'

Q7. Case: a service that parses JSON received from a socket throws parse errors a few times a month, only in production. The failing payloads include both JSON cut off midway and two JSON documents concatenated. What is the correct fix?

Q8. Case: a transfer goes completely silent for several seconds, then resumes with a retransmission of the same segment, in a repeating pattern. Almost no duplicate ACKs are seen. What is happening to the sender's congestion window (cwnd) during this?

Closing the course — reading with the numbers' feelings

Well done. The number of facts you memorized in this course is actually tiny. What you should take with you instead is a way of reading that works in any capture and any incident log.

  • Reliable delivery (noticing when it fails) — the ack is the next byte wanted. A duplicate ACK is an arrow pointing at the head of the gap. Retransmissions come in a mild type (duplicate ACK) and a severe type (RTO)
  • In order — cumulative acknowledgment and the receive buffer repair disorder. But boundaries lie outside the promise — the application builds them with framing
  • Paced to the peer and the network — the ceiling is min(rwnd, cwnd) ÷ RTT. A zero window means the peer is clogged; a cwnd cliff means the path is congested

If an investigation that used to stop at "some kind of timeout, let's just restart it" has turned into one that can point at which promise, in which packet, was about to be broken and how, this course has met its goal. The next time you open a capture, the columns of seq, ack, and win should read like sentences.