What is TCP?
Transmission Control Protocol, a reliable, ordered, connection-oriented transport that sits below HTTP and most other application protocols.
Also known as: Transmission Control Protocol
TCP gives applications a stream abstraction: you write bytes in one end, and the same bytes come out the other end in order, even though the underlying network drops, reorders, and duplicates packets. It does this with sequence numbers, acknowledgements, retransmissions, and a sliding window for flow control. The cost is overhead: a three-way handshake (SYN, SYN-ACK, ACK) before any data flows, plus per-segment acks throughout the connection.
HTTP/1.1 and HTTP/2 both run over TCP, and most of the latency improvements in those versions come from doing more work per connection (keep-alive, multiplexing) so the handshake cost amortizes. HTTP/3, by contrast, ditches TCP for QUIC over UDP precisely because TCP head-of-line blocking penalizes lossy mobile networks.
For crawlers, TCP shows up mostly as a tail-latency story: a long-lived TCP connection to a target is much cheaper per request than a fresh dial each time. Connection pooling in libraries like httpx, requests, or browser HTTP clients exists to keep TCP sockets warm.
In the wild
- A browser keeping one TCP connection open to a CDN edge to fetch all assets on a page
- A scraper reusing a connection pool to hit 1,000 URLs on the same host without re-handshaking
- A health checker timing out after 5 seconds when the SYN-ACK never arrives