4.3.26Computer Networks

HTTP - 3 — QUIC, UDP-based, why

2,063 words9 min readdifficulty · medium

WHAT is HTTP/3?

So the layering changed:

Layer HTTP/2 HTTP/3
Application HTTP/2 HTTP/3
Security TLS over TCP TLS 1.3 baked into QUIC
Transport TCP QUIC (over UDP)
Network IP IP

WHY did they leave TCP? (the core motivation)

Problem 1: TCP head-of-line (HOL) blocking

QUIC fixes this with independent streams: each HTTP request/response gets its own stream with its own ordering. A loss on stream A only blocks stream A. Streams B, C, D keep flowing.

Problem 2: Slow connection setup

Problem 3: TCP can't evolve

Problem 4: Connection survives network change


WHY UDP specifically? (steel-manning the choice)

You might ask: "Why not invent a brand-new transport protocol number at the IP layer?" Because the internet's middleboxes would drop unknown protocols. UDP is already universally allowed (it carries DNS!). So QUIC piggybacks on UDP as a "delivery truck" and rebuilds all of TCP's good features in encrypted user space. UDP gives you ports + checksum; QUIC adds back reliability, ordering, flow control, and congestion control.

Figure — HTTP - 3 — QUIC, UDP-based, why

HOW the math of "why it's faster" works

Connection setup latency

HOL blocking: expected stall


Common mistakes


Recall Feynman: explain to a 12-year-old

Imagine you're moving 50 toys to a friend's house using one delivery truck, and the rule is "unload them strictly in order." If toy #1 falls off and has to be re-fetched, the driver won't unload toys #2–#50 either — everyone waits for toy #1. That's TCP. Now imagine each toy rides in its own little go-kart on the same road. If one go-kart breaks down, the other 49 keep arriving. That's QUIC/HTTP3. And the go-karts use the ordinary road (UDP) that's open everywhere, instead of a fancy special road that guards keep blocking. Plus, you can switch from your bike to a car halfway (Wi-Fi to mobile data) and the go-karts still find you.


Connections

  • HTTP-2 — multiplexing and HPACK
  • TCP — three-way handshake and reliability
  • UDP — connectionless transport
  • TLS 1.3 — handshake and 0-RTT
  • Head-of-line blocking
  • Congestion control — slow start, AIMD
  • Middlebox ossification and protocol evolution

Flashcards

What transport protocol does HTTP/3 run on?
QUIC, which itself runs over UDP.
Why is QUIC built on UDP instead of a brand-new transport protocol?
Middleboxes drop unknown IP protocols, but UDP is universally allowed; QUIC rebuilds TCP-like features in encrypted user space on top of UDP.
What is TCP head-of-line blocking?
One lost TCP segment stalls delivery of all already-received later bytes, because TCP guarantees strict in-order delivery of a single byte stream.
How does QUIC eliminate transport-level HOL blocking?
It uses independent streams, each with its own ordering, so a loss in one stream doesn't block the others.
How many RTTs does QUIC need to start sending data (fresh vs resumed)?
1-RTT fresh, 0-RTT on resumed connections.
Why is TLS in HTTP/3 not optional?
QUIC has encryption (TLS 1.3) baked into the transport; there is no unencrypted QUIC.
What lets a QUIC connection survive a Wi-Fi→mobile IP change?
The Connection ID, which identifies the connection independently of the IP/port 4-tuple.
Did HTTP/3 change HTTP request/response semantics?
No — methods, headers, status codes stay the same; only the transport changed (and QPACK replaces HPACK).
Why can't TCP easily evolve across the internet?
It lives in the kernel and is inspected/modified by middleboxes, so changes get blocked (ossification).
Setup time: TCP+TLS1.3 vs QUIC fresh, with RTT=60ms?
120 ms vs 60 ms (and 0 ms for QUIC 0-RTT).

Concept Map

keeps semantics from

runs over

runs over

runs over

provides

merges handshakes

bakes in

single ordered stream causes

fixes

fixes

lives in user space, avoids

hides payload from

HTTP/3

HTTP/2

QUIC

UDP

TCP

Independent streams

1-RTT and 0-RTT setup

TLS 1.3 encryption

HOL blocking

Slow TCP handshake

Middlebox ossification

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, HTTP/3 ka core idea simple hai: pehle HTTP TCP ke upar chalta tha, ab QUIC ke upar chalta hai, aur QUIC khud UDP ke upar baithta hai. TCP ka problem yeh tha ki woh saara data ek single ordered stream me bhejta hai — matlab agar ek chhota packet bhi kho gaya, toh uske baad ke saare bytes deliver nahi honge jab tak woh khoya packet wapas nahi aata. Web page me 50 objects ek saath load hote hain, toh ek loss poori connection ko freeze kar deta hai. Isko hum head-of-line blocking kehte hain.

QUIC isko fix karta hai independent streams se — har request ki apni alag line hai, toh ek stream ka loss baaki streams ko nahi rokta. Plus QUIC ka handshake fast hai: TCP+TLS me 2 round-trip lagte the, QUIC me sirf 1-RTT (aur returning user ke liye 0-RTT, yaani request data pehle hi packet me chala jaata hai). High-RTT mobile networks pe yeh bahut bada faayda hai.

Ab sawaal: UDP hi kyun? Kyunki internet ke beech me jo middleboxes (routers, firewalls) hote hain, woh naye-naye protocols ko drop kar dete hain, lekin UDP ko sab allow karte hain (DNS bhi UDP use karta hai). Toh QUIC UDP ko ek "delivery truck" ki tarah use karta hai aur TCP ke saare achhe features (reliability, ordering, congestion control) khud rebuild karta hai — woh bhi encrypted user-space me, taaki upgrade karna aasaan ho. Encryption (TLS 1.3) QUIC me mandatory hai.

Ek aur mast cheez: QUIC me Connection ID hota hai jo IP/port pe depend nahi karta, isliye jab tum Wi-Fi se mobile data pe switch karte ho, video stream nahi tutta — connection migrate ho jaati hai. Yaad rakhna: HTTP/3 ne HTTP ke meaning (GET, POST, headers, status codes) ko nahi badla, sirf neeche ka transport badla hai.

Go deeper — visual, from zero

Test yourself — Computer Networks