HTTP & Networking
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
How Brand.dev uses tcp
Endpoints in the Brand.dev API where this concept comes up directly.
FAQ
TCP vs UDP?
TCP is reliable and ordered; UDP is fire-and-forget. Use TCP when you need a stream (HTTP, SSH, databases). Use UDP when latency beats reliability (DNS lookups, video, QUIC, online games).
What is the TCP handshake?
Three packets to establish a connection: client sends SYN, server replies SYN-ACK, client replies ACK. After that, data can flow. With TLS on top, you pay another round trip or two before the first HTTP byte.
Why does HTTP/3 abandon TCP?
Head-of-line blocking: one lost TCP segment stalls every multiplexed stream. QUIC over UDP gives each stream its own loss-recovery state, which helps a lot on mobile.
Related terms
The application protocol the web is built on, a simple request/response format for asking a server for a resource.
A three-digit number returned by an HTTP server that summarizes the result of a request, grouped into 1xx informational, 2xx success, 3xx redirect, 4xx client error, and 5xx server error.
A numeric label assigned to every device on a network that uses the Internet Protocol, used to route packets between hosts.
The successor to IPv4, using 128-bit addresses to provide a vastly larger address space and a few protocol simplifications.
HTTP encrypted with TLS, the same protocol, but every byte on the wire is authenticated and protected from eavesdroppers.