Skip to content
Tutorials

HTTP/2 and HTTP/3 Explained: Multiplexing, QUIC and What Changes for Your App

AIDToolStack EditorialNovember 7, 20268 min read
HTTP/2HTTP/3QUICWeb Performancenginx
Share:Twitter

Open DevTools on almost any site you work on, add the Protocol column to the Network panel, and you'll probably see h2 and maybe h3 next to most requests. Nobody on your team wrote code for that. The CDN or reverse proxy negotiated it. MDN's history of HTTP puts the quick uptake of HTTP/2 down to exactly that: it "didn't require changes to websites and applications".

So why should an application developer care? Because a handful of things really do change: what your headers may contain, which old performance tricks stopped making sense, why a feature like server push quietly disappeared, and what you need to open on a firewall before HTTP/3 works on your own server. This post covers the mechanics briefly and spends most of its time on those.

The specs, with dates

SpecWhat it isPublished
RFC 7540HTTP/2, first versionMay 2015 (per MDN)
RFC 9000QUIC transportMay 2021
RFC 9113HTTP/2, revised; obsoletes 7540 and 8740June 2022
RFC 9114HTTP/3 over QUICJune 2022
RFC 9204QPACK, HTTP/3's header compressionreferenced by RFC 9114

The thing to hold onto: methods, status codes, headers and caching rules are the same in all three versions. MDN says HTTP/3 "has the same semantics as earlier versions of HTTP". What differs is how messages are packaged and carried.

Protocol stacks side by side: HTTP/1.1 text messages over optional TLS over TCP; HTTP/2 binary frames and HPACK over TLS over one TCP connection; HTTP/3 binary frames and QPACK over QUIC, which includes streams, loss recovery and TLS 1.3, over UDP
Protocol stacks side by side: HTTP/1.1 text messages over optional TLS over TCP; HTTP/2 binary frames and HPACK over TLS over one TCP connection; HTTP/3 binary frames and QPACK over QUIC, which includes streams, loss recovery and TLS 1.3, over UDP

HTTP/2: one connection, many streams

In practice an HTTP/1.1 connection handles one request at a time: send it, wait for the whole response, then the next. Browsers worked around it by opening several connections; MDN says "most browsers allow up to six TCP connections per website (or origin)".

HTTP/2 switched to a binary framing layer. RFC 9113's abstract describes the result as "field compression and allowing multiple concurrent exchanges on the same connection". Each request/response pair is a stream, frames from different streams interleave on one TCP connection, and headers are compressed with HPACK because most of them repeat on every request.

The 2022 revision also cleaned house. It deprecates HTTP/2's original priority signalling scheme, which it says saw little uptake, and points to RFC 9218 instead. It deprecates the cleartext h2c upgrade, which "was never widely deployed". And it's candid about the limit of the design: "TCP head-of-line blocking is not addressed by this protocol."

That last sentence is the whole reason HTTP/3 exists.

HTTP/3: the same idea, moved onto QUIC

TCP delivers one ordered stream of bytes. If a single packet goes missing, everything behind it waits in the kernel until the retransmission arrives, even bytes that belong to a completely different HTTP/2 stream. MDN puts it plainly: because HTTP/2 runs over one TCP connection, loss handling at the TCP layer "can block all streams."

Comparison of one lost packet: over HTTP/2 and TCP, packets from streams A and C wait behind the lost B packet; over HTTP/3 and QUIC, only stream B waits while A and C are delivered
Comparison of one lost packet: over HTTP/2 and TCP, packets from streams A and C wait behind the lost B packet; over HTTP/3 and QUIC, only stream B waits while A and C are delivered

QUIC runs over UDP and does its own reliability per stream. RFC 9000 says data within a stream arrives in order, but "QUIC does not provide any means of ensuring ordering between bytes on different streams", and RFC 9114 maps each request to its own stream, so a lost packet only stalls the stream it belonged to. A few other properties fall out of the design:

  • TLS is built in. RFC 9000 says "QUIC integrates the TLS handshake", using TLS 1.3 (the details are in RFC 9001). There's no unencrypted HTTP/3.
  • Connections survive network changes. QUIC identifies connections by connection IDs rather than by IP and port, and "connection migration uses connection identifiers to allow connections to transfer to a new network path", which is what you want when a phone hops from Wi-Fi to mobile data.
  • New header compression. HPACK assumes in-order delivery, which QUIC no longer guarantees across streams, so RFC 9114 replaces it with QPACK.

How a browser ends up on HTTP/3

A browser can't just try UDP on a hunch. The server has to advertise it. RFC 9114 describes the Alt-Svc response header, plus ALPN in the TLS handshake where "the token "h3" is used". A typical header:

Alt-Svc: h3=":443"; ma=86400

ma is how long the client may remember the alternative, in seconds; MDN's Alt-Svc reference says it "defaults to 24 hours" when omitted. Since the advert arrives in a response, a client that learns about HTTP/3 only through Alt-Svc has already made at least one request over TCP. DNS can short-circuit that: RFC 9460 (November 2023) defines HTTPS records, which can carry alpn=h2,h3 so a client knows before it connects.

Browser support is no longer the constraint. caniuse lists HTTP/3 as supported from Chrome 87, Edge 87, Firefox 88 and Safari 16.0, about 95% of global usage. Clients that can't do it carry on with HTTP/2 or 1.1.

Turning it on for your own server

If you're behind Cloudflare, CloudFront or a similar CDN, the edge handles this, and the hop to your origin can stay HTTP/1.1. (Our Cloudflare vs CloudFront comparison covers the differences between those two.) On your own box:

server {
    listen 443 quic reuseport;
    listen 443 ssl;

    ssl_certificate     /etc/ssl/example.com.crt;
    ssl_certificate_key /etc/ssl/example.com.key;

    location / {
        add_header Alt-Svc 'h3=":443"; ma=86400';
    }
}

nginx's docs recommend OpenSSL 3.5.1 or later; with older OpenSSL it falls back to a compatibility layer that doesn't support early data. Then the step everybody forgets: QUIC is UDP, so UDP 443 has to be open in your firewall and your cloud provider's security group. If it isn't, browsers stay on HTTP/2 and nothing visibly breaks, which is how this goes unnoticed for months.

What actually changes in your code

Header names are lowercase. RFC 9113 says field names "MUST be converted to lowercase when constructing an HTTP/2 message", and receivers treat uppercase names as malformed. Code that looks headers up case-sensitively, hand-rolled proxies and tests that compare Content-Type byte-for-byte will notice.

Some headers are forbidden. HTTP/2 messages must not contain connection-specific fields: Connection, Proxy-Connection, Keep-Alive, Transfer-Encoding and Upgrade. TE is allowed only with the value trailers. A message containing the others is malformed. If you write a proxy, strip them when going from HTTP/1.1 to HTTP/2.

There's no reason phrase. An HTTP/2 response carries a :status pseudo-header and no "Not Found" text. MDN's Response.statusText page notes that "HTTP/2 does not support status messages", so don't build UI from statusText; map the number yourself (our HTTP status codes post has a table).

Server push is gone in browsers. Chrome disabled HTTP/2 push by default in Chrome 106 (Chrome blog) and pointed people to 103 Early Hints and preload instead. Early Hints sends Link: </main.css>; rel=preload; as=style style headers before the real response; per Chrome's docs it works for navigation requests only, mainly over HTTP/2 and HTTP/3.

The six-connection ceiling mostly goes away. This matters most for long-lived requests. MDN's EventSource page warns that without HTTP/2, Server-Sent Events are limited to 6 connections per browser and domain across all tabs, while over HTTP/2 the stream limit is negotiated and "defaults to 100". If users open your dashboard in several tabs, serving it over HTTP/2 is the fix. Our SSE post and the WebSockets vs SSE guide go further.

0-RTT can replay requests. QUIC and TLS 1.3 let a returning client send data in its first flight, and nginx enables that with ssl_early_data on. MDN's 425 Too Early page explains the cost: early data can be replayed, so servers should refuse to process anything non-idempotent sent that way and answer 425. If you turn 0-RTT on, decide which routes may accept it.

Your caching headers don't change at all; Cache-Control and ETags mean the same thing on every version.

Checking what you actually got

  • DevTools: right-click the Network table header and enable Protocol; Chrome shows h2 for HTTP/2 and h3 for HTTP/3 (reference). Unless an HTTPS DNS record advertises it, h3 may only show up after an earlier response delivered Alt-Svc.
  • curl: curl -sS -o /dev/null -w '%{http_version}\n' https://example.com prints the version used. --http3-only fails instead of falling back, which makes a good test that UDP 443 is reachable. You need a curl built with HTTP/3 support; curl's HTTP/3 page says only the ngtcp2 backend is non-experimental.
  • Timing: compare time_appconnect and time_total between --http2 and --http3 runs, then paste the phases into our HTTP timing analyzer to see where the time went.

A short decision list

  1. Behind a CDN? HTTP/2 and HTTP/3 are probably already on. Check the Protocol column and move on.
  2. Running your own reverse proxy? Enable HTTP/2 now; add HTTP/3 if you can open UDP 443 and your proxy supports it.
  3. Using SSE or many parallel requests? HTTP/2 is the fix for the connection limit.
  4. Writing a proxy or gateway? Lowercase header names and strip connection-specific headers.
  5. Turning on 0-RTT? Only for idempotent routes, and handle 425.
  6. Still relying on server push? Move to Early Hints or preload.
AE

Written by AIDToolStack Editorial

Researched from official documentation, specifications and vendor pages, listed under Sources below. Last checked November 2026.

Sources

  1. www.rfc-editor.org/rfc/rfc9113.html
  2. www.rfc-editor.org/rfc/rfc9114.html
  3. www.rfc-editor.org/rfc/rfc9000.html
  4. www.rfc-editor.org/rfc/rfc9460.html
  5. developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Evolution_of_HTTP
  6. developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Alt-Svc
  7. developer.mozilla.org/en-US/docs/Web/API/EventSource
  8. developer.mozilla.org/en-US/docs/Web/API/Response/statusText
  9. developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/425
  10. caniuse.com/http3
  11. nginx.org/en/docs/quic.html
  12. nginx.org/en/docs/http/ngx_http_v3_module.html
  13. caddyserver.com/docs/caddyfile/options
  14. developer.chrome.com/blog/removing-push
  15. developer.chrome.com/docs/web-platform/early-hints
  16. developer.chrome.com/docs/devtools/network/reference
  17. curl.se/docs/http3.html

Related Posts

Explore on AIDToolStack

Discover tools and servers featured in our directory.

MCP Servers

Trigger.dev Jobs MCP ServerManage Trigger.dev background jobs from your AI coding assistant. Monitor job runs, trigger tasks manually, inspect execution logs, manage schedules, and debug failed runs. The server provides operational visibility into your background job infrastructure — see which tasks are running, queued, or failed, and take action. Your AI can help diagnose job failures from execution logs, retry failed tasks, and optimize concurrency configurations for better throughput.Tailscale Network MCP ServerManage your Tailscale mesh VPN network from your AI coding assistant. View connected devices, manage ACLs, configure exit nodes, check device status, and manage DNS settings. The server provides visibility into your Tailscale network — see which machines are online, troubleshoot connectivity issues, manage network access policies, and configure routes. Useful for developers managing distributed infrastructure where Tailscale provides secure networking between services.Portainer Docker MCP ServerManage Docker environments through Portainer's API from your AI coding assistant. Control containers, images, networks, and volumes across multiple Docker hosts and Kubernetes clusters. The server provides tools for container lifecycle management, image pulling and building, stack deployment, and resource monitoring. Portainer's multi-environment management makes this server particularly valuable for teams managing containers across development, staging, and production environments.

Reviews

Sign in to leave a review.

No reviews yet. Be the first!

Comments

Sign in to leave a comment.

No comments yet. Be the first!

Sponsor Our Newsletter

Reach thousands of developers who are actively evaluating AI tools, MCP servers, and dev infrastructure. Our weekly newsletter goes to engaged technical decision-makers.

Growing subscriber baseHigh open rates

All sponsored content is clearly labeled per our editorial policy.