TodayTools

HTTP over QUIC

How HTTP/3 works

The web on QUIC, quick on bad networks

Donate
L7ApplicationPort 443QUIC
What brings you here?

Watch it happen

How much detail

Opening a news site over HTTP/3: DNS hints at h3, QUIC connects, then the request goes on stream 0.

Kenji's laptop
Home router
Internet
DNS resolver
news.example.com
Wi-FiInternetLookupSetupRequestResponseDataControlEncrypted

5 steps, 9 packets

First up: Find out h3 works. Press Play to watch it happen, one step at a time.

0 of 50/5

What is HTTP/3?

HTTP/3 is the third major version of HTTP. Requests, headers and status codes are the same as before, but instead of running over TCP and TLS it runs over QUIC, an encrypted transport built on UDP. Each request gets its own QUIC stream.

The gain shows up on real networks. Connecting takes one round trip instead of two, a lost packet only delays the file it belonged to, and a download can survive a phone switching from Wi-Fi to mobile data. Most large sites and every major browser support it.

Think of it like this. HTTP/2 is a train where every carriage is coupled: if one carriage stops, the whole train waits. HTTP/3 sends each delivery in its own van on the same road. If one van gets a flat tyre, the others still arrive on time.

Step by step

Normal

5 steps

Opening a news site over HTTP/3: DNS hints at h3, QUIC connects, then the request goes on stream 0.

  1. 1

    Find out h3 works

    A DNS HTTPS record says alpn=h3

    The browser learns a site speaks HTTP/3 from a DNS HTTPS record, or from an Alt-Svc header on an earlier HTTP/2 visit. Without either hint it starts with TCP.

  2. 2

    QUIC handshake

    Transport and TLS in one round trip

    QUIC sets up the connection and TLS 1.3 together. The ALPN token h3 confirms both sides will speak HTTP/3.

  3. 3

    Control streams

    SETTINGS and QPACK streams open

    Each side opens a one-way control stream with its SETTINGS, plus two small streams that keep the QPACK header tables in step.

  4. 4

    Request

    HEADERS on stream 0

    The GET goes in a HEADERS frame on client stream 0, compressed with QPACK. It leaves in the same datagram as the handshake's last message.

  5. 5

    Response

    HEADERS then DATA on stream 0

    The server answers on stream 0 with a HEADERS frame (200) and DATA frames. The stream's FIN bit marks the end, there is no END_STREAM flag as in HTTP/2.

One packet lost

4 steps

Three files at once on lossy Wi-Fi. A lost packet delays only its own file, the others carry on.

  1. 1

    Three requests

    Streams 4, 8 and 12

    The page asks for a stylesheet, a script and a photo, each on its own QUIC stream.

  2. 2

    One packet lost

    It held part of the script

    Packet 15 is dropped by busy Wi-Fi. It carried bytes of stream 8 only.

  3. 3

    Others keep going

    Streams 4 and 12 are not held back

    QUIC orders bytes per stream, not per connection. The stylesheet and photo are handed to the browser as they arrive. Over HTTP/2 on TCP all three would wait.

  4. 4

    Resend

    New packet number, same bytes

    The ACK shows a gap, so the server resends the script bytes in packet 18. Only the script waited for this round trip.

UDP blocked

3 steps

At the office the firewall drops UDP 443. The browser quietly falls back to HTTP/2 over TCP.

  1. 1

    QUIC tries

    Initial packets vanish

    The browser sends a QUIC Initial to UDP 443. The office firewall drops it, because it only allows web traffic over TCP.

  2. 2

    TCP in parallel

    A normal HTTPS connection starts

    Browsers do not wait long for QUIC. A moment later they also start TCP plus TLS and use whichever answers first.

  3. 3

    HTTP/2 wins

    The page loads anyway

    TLS picks h2 and the page loads over HTTP/2. The browser remembers that QUIC is broken on this network for a while, so it stops trying.

Myths and mix-ups

  • HTTP/3 changes how websites are written; pages, methods and status codes stay exactly the same.
  • HTTP/3 is unreliable because it uses UDP; QUIC adds its own reliable delivery on top.
  • If HTTP/3 is blocked, the site breaks; browsers fall back to HTTP/2 or HTTP/1.1 over TCP.
  • HTTP/3 is always faster; on a clean wired network the gain is small, it shines on lossy or mobile links.

Try it yourself

Run these on your own computer to see HTTP/3 at work.

  • Fetch over HTTP/3

    curl --http3 -sI https://example.com/ | head -1

    Needs a curl built with HTTP/3. Prints HTTP/3 200 when it worked, or falls back to an older version.

  • Look for the hint

    curl -sI https://example.com/ | grep -i alt-svc

    An alt-svc line with h3 means the server offers HTTP/3.

  • Check the DNS record

    dig example.com HTTPS +short

    An answer with alpn=h3 tells browsers they can try HTTP/3 at once.

  • In the browser

    F12, Network tab, Protocol column

    h3 means the file came over HTTP/3. Reload twice: the first visit is often h2.

HTTP/3 at a glance

Layer
Application (7)
Port
UDP 443
Transport
QUIC (TLS 1.3 built in)
Header compression
QPACK (RFC 9204)
ALPN token
h3
Discovery
Alt-Svc header or DNS HTTPS record
Published
June 2022

Defined inRFC 9114RFC 9204RFC 9000RFC 9110RFC 9460

Header fields

What HTTP/3 puts in its messages, with example values from the stories above.

HTTP/3 HEADERS

QUIC stream
0Requests use client streams 0, 4, 8 and so on. Each one is delivered in order on its own.
Frame type
HEADERS (0x01)
Field section
QPACK compressed, 38 bytesQPACK is HPACK reworked so a lost packet on one stream cannot block header decoding on another.

HTTP/3 DATA

QUIC stream
0Requests use client streams 0, 4, 8 and so on. Each one is delivered in order on its own.
Frame type
DATA (0x00)
Length
1120 bytes of HTML
Delivered to browser
Yes, at onceStream 12 has no gap of its own, so nothing holds it back.

Test yourself

Question 1 of 5Score 0

What does HTTP/3 run on?

Questions people ask

What is the difference between HTTP/2 and HTTP/3?

Both send many requests over one connection. HTTP/2 runs on TCP, so one lost packet stalls everything. HTTP/3 runs on QUIC, where each request is independent and connections set up faster.

Does HTTP/3 use UDP?

Yes. It uses QUIC, which runs over UDP port 443 and adds reliability, ordering and encryption itself.

How do I check if a site uses HTTP/3?

Open the browser's Network tab with the Protocol column on and look for h3, or run curl --http3 with a curl that supports it.

Is HTTP/3 secure?

Yes. QUIC always uses TLS 1.3, so there is no unencrypted HTTP/3.

Why does my first visit use HTTP/2 and later visits HTTP/3?

Without a DNS HTTPS record the browser first connects over TCP, sees an Alt-Svc header offering h3, and uses HTTP/3 from the next connection on.

Donate