From URL to bytes · mid
DNS, TCP and TLS 1.3: round trips and connection reuse
Before the first byte, a new connection costs a DNS lookup, a TCP handshake and a TLS handshake (TLS 1.3: one round trip), and TCP slow start limits how much data the server can send in the first round trips, so reusing connections and reducing origins matters on high-latency networks.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- DNS answers are cached with a TTL. dns-prefetch and preconnect hints can do this work early.
- TCP: SYN, SYN-ACK, ACK = one round trip before data can flow.
- TLS 1.3 full handshake: one round trip; TLS 1.2: two. TLS 1.0 and 1.1 should not be used.
- 0-RTT (TLS 1.3 resumption / QUIC): the client sends data in its first flight. That early data has no replay protection, so it must only carry idempotent requests (like GET).
- TCP slow start: the server starts with a small congestion window (about 10 packets, roughly 14 KB) and doubles it each round trip, so the first ~14 KB of HTML should contain what the page needs to start rendering.
- Keep-alive and HTTP/2/3 reuse one connection for many requests; each extra origin (fonts host, analytics, image CDN) needs its own DNS + TCP + TLS.
The red pen
Common traps: mistake → fix
Mistake: "Bandwidth is what makes mobile slow"
Fix: for small files latency (round trips) matters more than bandwidth.
Mistake: "0-RTT is free speed"
Fix: 0-RTT data can be replayed; only safe, idempotent requests should use it.
Easy to hard
Questions interviewers ask, easy to hard
- How many round trips before the first byte of HTML on a brand-new HTTPS connection?
- What changed in TLS 1.3 for performance?
- What is TCP slow start and why do people talk about the first 14 KB?
- Why can moving fonts from a third-party host to your own domain make the page faster?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.