The Runtime Theory
TCP Transport

TCP Provides an Ordered Byte Stream

TCP provides applications with a reliable, ordered byte stream over an IP network.

The Runtime Theory Team5 min read#tcp#transport#congestion-control
▸ On this page

The model

TCP provides applications with a reliable, ordered byte stream over an IP network. It tracks sequence numbers, acknowledges received ranges, retransmits data when needed, and applies flow and congestion control. The application sees a stream of bytes rather than message boundaries.

A concrete walk-through

A sender can write a short buffer, but TCP may combine it with other data or split it across segments. The receiver must parse its own framing format, such as a fixed length, delimiter, or length prefix. An acknowledgement confirms transport-level receipt, not that the remote application completed a business operation.

Costs and failure cases

Connections can stall, reset, or time out, and a successful local write does not prove remote delivery. Flow control protects the receiver; congestion control responds to network conditions. Retrying an application operation after uncertainty can duplicate side effects unless the operation is idempotent.

Check your understanding

An API sends two JSON objects over one TCP connection. Explain why a single read call cannot be assumed to return exactly one complete object, and propose a framing strategy.

Further reading

RFC 9293: Transmission Control Protocol

Not started

Sign in to save your learning progress.

Sign in to save