Interactive course · 5 lessons · ~2 hours

TCP Internals:
reliable pipes, unreliable world

How does a stream of bytes arrive perfectly intact across a network that actively drops, reorders, and duplicates packets? This course dissects the Transmission Control Protocol (TCP): the state machine, the sequence numbers, flow control, and congestion control. Build a connection, trigger a retransmission, and learn why your app feels slow when the network is congested.

01

Handshake & Teardown: connection state

Before data can flow, state must be synchronized. Send a SYN, receive a SYN-ACK, and understand why the 3-way handshake exists. Then, close the connection gracefully with a FIN or abruptly with a RST.

SYN / ACKFIN / RSTstate machineTIME_WAIT
02

Reliability: sequence numbers & RTO

The core of TCP: masking packet loss. Map sequence numbers to byte streams, send overlapping data, and watch the Retransmission Timeout (RTO) timer step in when the network swallows your packets.

sequence numberscumulative ACKspacket lossRTO
03

Flow Control: the receive window

Protecting the receiver from being crushed. Play the role of a fast sender hitting a slow application. Watch the receive window (rwnd) shrink to zero, forcing the sender into a zero-window probe state.

receive bufferrwndzero-windowwindow scaling
04

Congestion Control: protecting the internet

Flow control protects the receiver: congestion control protects the network. See why connections start slow (Slow Start), grow linearly (AIMD), and aggressively scale back when the network buffer overflows.

cwndslow startAIMDfast recovery
05

UDP: when not to use TCP

TCP's guarantee of in-order delivery creates a fatal flaw for real-time systems: Head-of-Line blocking. Race a TCP stream against a UDP stream through a lossy link and see why video calls and games bypass TCP.

UDP datagramsmultiplexinghead-of-line blockingreal-time
Prerequisites: A basic understanding of what an IP address and a port are. If you aren't sure, check out the Cloud Networking course first.