# HTTP/2 vs HTTP/3: Streams, QPACK, QUIC, and Migration

> Compare HTTP/2 and HTTP/3 multiplexing, HPACK versus QPACK, TCP and QUIC head-of-line blocking, 0-RTT, Alt-Svc discovery, fallback, and debugging.

**Quick answer:** HTTP/2 multiplexes streams over one TCP connection, so a single lost packet stalls every stream until retransmission. HTTP/3 carries independent streams over QUIC and UDP, mandates TLS 1.3, and adds 0-RTT plus connection migration. Advertise HTTP/3 with Alt-Svc, keep an HTTP/2 fallback when UDP is blocked, and measure cold connections rather than warm ones to see the real difference.

## Key takeaways

- HTTP/2 fixes application-level request queueing but keeps TCP's transport-level head-of-line blocking; HTTP/3 removes the TCP coupling, not every queue.
- HPACK keeps one ordered dynamic table per connection; QPACK adds encoder and decoder streams plus a bounded blocked-stream budget so header blocks can arrive out of order.
- HTTP/3 requires TLS 1.3 and inherits QUIC's 0-RTT and connection migration, but early data is replayable and migration is not free of middlebox and routing work.
- Discovery happens through Alt-Svc or HTTPS DNS records, and every HTTP/3 deployment needs a working HTTP/2 path for networks that drop UDP 443.
- Server push is effectively retired, prioritization needs explicit RFC 9218 configuration, and warm-connection benchmarks systematically overstate HTTP/3 gains.

---

HTTP/2 and HTTP/3 are often compared as if one were a faster version of the other. They solve different layers of the same problem. HTTP/2 keeps TCP and rewrites how requests share it. HTTP/3 replaces TCP with QUIC and moves reliability, congestion control, and encryption into user space. The upgrade changes handshakes, loss recovery, header compression, discovery, and failure modes, and it changes what you have to measure. A site can be faster on HTTP/3 over a lossy mobile network and slower on the first visit, or fail entirely behind a firewall that drops UDP. The useful question is not which protocol wins; it is which behavior your traffic actually exhibits.

## What HTTP/2 and HTTP/3 change beneath the request

Both protocols carry the same HTTP semantics: methods, status codes, fields, cookies, redirects, and caching rules do not change. HTTP/2 introduced binary framing, a single connection carrying many concurrent streams, per-stream and connection flow control, and HPACK header compression. It can run over TLS with ALPN `h2`, or over cleartext TCP as `h2c`, though browsers only use the latter in narrow cases.

HTTP/3 keeps the frame and stream model but transports it over QUIC, which runs on UDP. QUIC provides per-stream ordered delivery, loss detection, congestion control, and a TLS 1.3 handshake integrated into the transport. There is no standard cleartext HTTP/3. ALPN uses `h3`, and the protocol is defined by RFC 9114 on top of RFC 9000.

The difference is not cosmetic. TCP is a single ordered byte stream, so every HTTP/2 stream depends on the same delivery sequence. QUIC exposes independent streams, so a packet loss only delays the streams that had bytes in that packet. That single change is the reason HTTP/3 exists, and it is also the reason HTTP/3 does not automatically fix slow origins, inefficient bundling, or a server that takes 800 milliseconds to render a page.

## Multiplexed streams and the head-of-line blocking that remains

HTTP/2 multiplexing removes the HTTP/1.1 rule that a connection carries one request at a time. A browser can issue dozens of requests over one connection, each with its own stream identifier, and responses can interleave. This eliminates the application-level queue that made six-connection limits painful, but it does not change TCP. If a segment is lost, the kernel's TCP stack holds back every byte after the gap, so all streams stall until the retransmission arrives. On a lossy link, one dropped packet can freeze the whole page even though the other responses were ready.

HTTP/3 addresses that specific failure. QUIC recovers lost packets independently and delivers each stream in order, so a loss only blocks streams whose data was in the lost packet. But head-of-line blocking is a property of queues in general, not a binary feature that disappears with a new transport. A single stream is still ordered: a large response cannot overtake itself. QPACK can block a stream when its header block references a dynamic-table entry that has not arrived. All streams still share one congestion window, so a bulk download can starve a critical stylesheet unless the server schedules and prioritizes. And the browser's dependency chain remains: the HTML must arrive before the browser discovers the CSS, the CSS must arrive before layout, and the API response must arrive before the client renders data.

The practical lesson is to reduce dependencies and keep critical resources small, not to assume that a newer protocol erases queueing. A 2 MB render-blocking script remains a 2 MB render-blocking script on HTTP/3.

## Header compression from HPACK to QPACK

HTTP/2 compresses headers with HPACK, which combines a static table of common fields with a per-connection dynamic table. The encoder inserts values into the table and later refers to them by index, so repeated `user-agent`, `cookie`, and `accept` fields cost a few bytes instead of hundreds. The cost is state: encoder and decoder must stay synchronized, and header blocks are decoded in the order they arrive on the connection. A lost packet delays the header blocks behind it, and a very large header block can hold up later streams while the decoder works through it.

QPACK keeps the same idea but adapts it to QUIC's out-of-order delivery. It uses a larger static table, a dynamic table managed through dedicated encoder and decoder streams, and an explicit blocked-stream limit negotiated in `SETTINGS_QPACK_BLOCKED_STREAMS`. A stream can reference an entry that has not arrived yet, but it may block until the entry is available; the limit bounds how much of the connection can be stuck. QPACK also uses absolute and relative indices so a late-arriving reference remains meaningful.

Neither scheme is a security boundary. Both compress secrets and attacker-influenced input into the same dynamic table, which keeps compression side channels such as BREACH relevant. Neither fixes header bloat: oversized cookies, verbose authorization tokens, and per-request tracing headers still cost bytes and decoder work. QPACK reduces cross-stream coupling, but a server that emits enormous header blocks will still create a local bottleneck. Clean up headers before blaming the compression format.

## TLS 1.3, 0-RTT, and connection migration

HTTP/3 requires TLS 1.3. QUIC integrates the TLS 1.3 handshake into its own packet flow, encrypts transport parameters and most packet metadata, and does not permit an unencrypted variant. HTTP/2 is more permissive: it can run over TLS 1.2 or higher, and it can run cleartext as h2c. That difference matters in regulated environments where TLS inspection appliances terminate and re-originate connections; those appliances often understand TCP well and QUIC poorly.

TLS 1.3 gives HTTP/3 a one-round-trip handshake on a cold connection and 0-RTT early data on a resumed one. 0-RTT is not free. Early data can be replayed by an attacker, it lacks forward secrecy, and it is only appropriate for requests that are safe to repeat. A server should reject or tightly rate-limit early data for state-changing methods, and a client should never treat 0-RTT as equivalent to a confirmed session. A `POST` that creates an order must not travel in early data just to save a round trip.

Connection migration is QUIC's other headline feature. Because packets carry a connection ID rather than relying only on the four-tuple, a client that moves from Wi-Fi to cellular can keep the same connection, and the server can validate the new path with a path challenge before sending bulk data. Servers can disable migration with a transport parameter, and middleboxes, load balancers, and anycast routing can still break the illusion. Migration helps a long download or video call survive a network switch; it does not make a request immune to a proxy that pins connections to a backend.

## Alt-Svc discovery, UDP blocking, and fallback

A client cannot open an HTTP/3 connection to an origin it has never contacted unless it learns that the origin supports HTTP/3. The bootstrap is usually an HTTP/2 response carrying `Alt-Svc: h3=":443"; ma=86400`, which tells the client to try QUIC on the same host and port for the next 24 hours. An HTTPS DNS record can advertise the same capability before the first HTTP request. The client caches the alternative service, and a later connection can go straight to QUIC.

Discovery has failure modes. UDP 443 is blocked by some corporate firewalls, VPNs, and captive portals; QUIC can also be throttled or dropped by networks that treat UDP as second-class. Browsers normally race or fall back to HTTP/2, but a stale Alt-Svc entry, a broken load balancer, or a server that advertises h3 before its UDP path is healthy can add delay and confusion. A failed QUIC attempt should teach the client to back off, not to retry on every navigation.

The operational rule is to run both listeners and advertise HTTP/3 only when the UDP path is working. Keep the HTTP/2 path fully functional, monitor the protocol mix and the rate of failed QUIC handshakes, and test from networks that block UDP on purpose. Forcing HTTP/3-only is a self-inflicted outage: users behind a UDP-blocking firewall get nothing, and the fallback that would have saved them was removed.

## HTTP/2 versus HTTP/3 in production

The comparison that matters is behavioral, not marketing.

| Dimension | HTTP/2 | HTTP/3 |
| --- | --- | --- |
| Transport | TCP | QUIC over UDP |
| Encryption | TLS 1.2+ or cleartext h2c | TLS 1.3 required, always encrypted |
| Multiplexing | Streams over one ordered TCP byte stream | Independent streams over QUIC |
| Packet loss | One lost segment stalls every stream | Loss blocks only affected streams |
| Header compression | HPACK, ordered dynamic table | QPACK, out-of-order with blocked-stream limit |
| Handshake | TCP plus TLS, often 2 RTT cold | QUIC plus TLS 1.3, 1 RTT cold, 0-RTT on resume |
| Connection migration | Not supported at transport layer | Supported through connection IDs and path validation |
| Discovery | Direct TCP connection | Alt-Svc or HTTPS DNS record, with fallback |
| Server push | Defined, effectively removed from browsers | Defined but optional, effectively removed |
| Prioritization | RFC 7540 tree deprecated; RFC 9218 optional | RFC 9218 optional, scheduler-dependent |

The table hides the part that decides most outcomes: server behavior. A tuned HTTP/2 origin with good caching, compression, and prioritization will beat a misconfigured HTTP/3 origin. Conversely, HTTP/3 can shine on a high-latency mobile link where TCP loss recovery is the bottleneck, even if the server configuration is identical. Measure the page, the network, and the server together.

## Prioritization, push deprecation, and connection coalescing

HTTP/2 originally carried a priority tree in which streams declared dependencies and weights. RFC 9113 deprecates that scheme, and many servers ignored it anyway. The replacement is the extensible prioritization scheme in RFC 9218: a `Priority` header with an urgency from 0 to 7 and an incremental flag, plus a PRIORITY_UPDATE frame for reprioritization. HTTP/3 uses the same model. It only helps if the server or CDN actually schedules by it; otherwise every stream is roughly equal and a large image can compete with the render-blocking stylesheet.

Server push is the cautionary tale. HTTP/2 and HTTP/3 define it, but Chrome removed push support in 2022, other browsers followed or disabled it by default, and clients can refuse it with `SETTINGS_ENABLE_PUSH=0` in HTTP/2 or a zero `MAX_PUSH_ID` in HTTP/3. A performance strategy built on push now depends on a feature most clients refuse. Use 103 Early Hints with `Link: rel=preload`, ordinary preload hints, and cache headers instead; they work with both protocols and respect the client's own scheduler.

Connection coalescing is an HTTP/2 optimization: a client may reuse one connection for several origins when the certificate covers all of them and the server is authoritative for each. The payoff is fewer handshakes; the risk is a shared failure domain and `421 Misdirected Request` when authority checks fail. HTTP/3's base specification has no ORIGIN frame equivalent, so cross-origin reuse generally means a separate QUIC connection and a separate handshake. Do not design an architecture that depends on coalescing in either version, and keep certificate SANs and DNS aligned if you rely on it.

## Debugging HTTP/2 and HTTP/3 with DevTools and curl

Start with the browser. In Chrome or Edge DevTools, open the Network panel, add the Protocol column, and reload with the cache disabled. You should see `h2` or `h3` per request, along with the remote address and timing breakdown. A request that says `h3` but stalls in queueing is telling you about server scheduling, not the transport. Use `chrome://net-export` when you need connection-level detail, and remember that DevTools shows the protocol of the request it recorded, not necessarily the protocol a later request will use.

Command-line tools answer different questions. `curl -V` reports whether HTTP/2 and HTTP/3 support were compiled in; HTTP/3 often requires a specific backend such as quiche or ngtcp2. `curl --http2` negotiates HTTP/2 over TLS, `curl --http2-prior-knowledge` speaks h2c without negotiation, and `curl --http3` attempts QUIC, falling back only if you let it. Add `-w '%{http_version}\n'` to print the negotiated version instead of guessing from headers.

```bash
# Verify which protocol curl actually negotiated
curl -sS -o /dev/null -w 'http_version=%{http_version} remote_ip=%{remote_ip}\n' \
  --http2 https://www.example.com/
curl -sS -o /dev/null -w 'http_version=%{http_version} remote_ip=%{remote_ip}\n' \
  --http3 https://www.example.com/

# Inspect the Alt-Svc advertisement and the response protocol
curl -sSI --http2 https://www.example.com/ | grep -iE '^(HTTP/|alt-svc:)'
openssl s_client -connect www.example.com:443 -alpn h2 -brief </dev/null
```

For deeper work, `nghttp` and `h2load` expose frame-level behavior, `qlog` records QUIC events, and Wireshark can decrypt QUIC with a TLS key log. The [HTTP request workbench](/tools/http-request) reproduces a request with exact headers, the [HTTP headers analyzer](/tools/http-headers) shows what the edge actually returned, and the [bandwidth calculator](/tools/network-bandwidth-calculator) helps separate transfer-time limits from protocol overhead.

## Verification checklist before and after migration

A migration is not complete when a browser shows `h3` once. Test cold and warm, from more than one network, and with a fallback path that is allowed to fail.

```bash
# Cold-ish protocol and fallback checks; repeat from a UDP-blocking network
for proto in --http2 --http3; do
  echo "== $proto =="
  curl -sS -o /dev/null -w 'status=%{http_code} version=%{http_version} time=%{time_total}\n' \
    "$proto" https://www.example.com/
done
curl -sSI --http3 https://www.example.com/ | grep -i '^alt-svc:' || true
```

| Check | How to test | Pass criteria |
| --- | --- | --- |
| Cold handshake | New browser profile or `curl` without a warm connection | `h2` and `h3` both complete; record TTFB, not only a warm repeat |
| Alt-Svc discovery | First request over h2, second over h3 | `Alt-Svc: h3=":443"` present and the second connection negotiates h3 |
| UDP reachability | Test from a network that blocks UDP 443 | Client falls back to h2 within a bounded time and the page still loads |
| Loss behavior | Introduce 1–3% packet loss with `tc netem` or a proxy | HTTP/3 improves or matches h2; no stream starvation from one large response |
| Header compression | Inspect request and response header sizes | No oversized cookies or duplicate headers; QPACK blocked streams stay bounded |
| 0-RTT safety | Replay an early-data request in a test environment | State-changing requests are rejected or deferred to 1-RTT |
| Push and priority | Check `SETTINGS_ENABLE_PUSH`, `MAX_PUSH_ID`, and RFC 9218 behavior | Push is off; critical CSS and HTML receive higher urgency than images |
| Fallback observability | Compare server protocol logs with client reports | h2/h3 mix and QUIC failure rate are visible and alertable |

## Common mistakes and production rules

The expensive mistakes repeat across teams:

- Measuring only a warm connection, where TLS resumption, a cached Alt-Svc entry, and an established congestion window hide the handshake cost that real first visits pay.
- Forcing HTTP/3-only behind a UDP-blocking firewall, then treating the resulting outage as a client bug.
- Assuming multiplexing removes all head-of-line blocking, when TCP loss, QPACK blocking, shared congestion control, and application dependencies still queue work.
- Sending a `POST` in 0-RTT and discovering later that the request was replayed.
- Building a performance plan on server push after browsers removed it.
- Leaving prioritization at defaults and wondering why a hero image delays the stylesheet.
- Over-coalescing origins onto one connection and turning a certificate or authority mistake into a site-wide `421`.
- Benchmarking on localhost, where there is no loss, no middlebox, and no realistic RTT.
- Blaming the protocol for server think time, oversized bundles, or a cache policy that forces revalidation on every navigation.

The production rules are short. Serve HTTP/2 and HTTP/3 from the same origin, advertise HTTP/3 only when its UDP path is healthy, and keep a tested fallback. Measure cold connections, lossy networks, and the full page, not a single warm asset. Treat 0-RTT as an optimization for safe requests, configure RFC 9218 priorities for the critical path, and use Early Hints instead of push. Finally, watch the protocol mix and QUIC failure rate in production; a protocol upgrade is a runtime behavior change, not a one-time deployment checkbox.

## Frequently asked questions

### Is HTTP/3 always faster than HTTP/2?

No. HTTP/3 usually wins on lossy or high-latency networks because packet loss no longer stalls unrelated streams, and it can save a round trip on resumed connections. On a clean, low-latency network the difference is often noise, and a first visit can be slower when the browser probes QUIC, waits for a timeout, then falls back to TCP.

### Why does a site fall back to HTTP/2 even though the server advertises h3?

The client may have failed its QUIC handshake, or a firewall, VPN, or captive portal may drop UDP 443. Browsers remember a broken alternative service and back off, so check Alt-Svc state, UDP reachability, and server logs before assuming the advertisement was ignored.

### Does HTTP/2 multiplexing eliminate head-of-line blocking?

It eliminates application-level queueing caused by the one-request-at-a-time rule of HTTP/1.1, but TCP still delivers one ordered byte stream. A lost TCP segment blocks every HTTP/2 stream until it is retransmitted, and QPACK blocking, shared congestion control, and application dependencies add further queues in HTTP/3.

### What replaces HTTP server push?

Use 103 Early Hints with Link rel=preload, ordinary preload and preconnect hints, and correct cache headers. Browsers removed HTTP/2 and HTTP/3 push support, and RFC 9114 leaves push optional, so a push-based performance plan now depends on a feature clients disable.

### Does connection migration keep a request alive when Wi-Fi drops?

QUIC can preserve the connection by rebinding it to a new path using a connection ID, then validating that path before sending bulk data. It still depends on server support, routing that keeps packets on the same backend, and a network that allows the new path; a hard handoff or a proxy can still terminate the connection.

## References

- [RFC 9113: HTTP/2](https://www.rfc-editor.org/rfc/rfc9113)
- [RFC 9114: HTTP/3](https://www.rfc-editor.org/rfc/rfc9114)
- [RFC 9000: QUIC](https://www.rfc-editor.org/rfc/rfc9000)
- [MDN: HTTP/3](https://developer.mozilla.org/en-US/docs/Glossary/HTTP_3)

---

- Canonical: https://www.jsonmind.com/guides/http2-vs-http3
- Locale: en
- Published: 2026-11-17
- Updated: 2026-11-17
- Tools: http-request, http-headers, network-bandwidth-calculator