CodePark/ questions / HTTP/1.1, HTTP/2 & HTTP/3
START PRACTICINGPRACTICE
Backend question · HTTP & API design › HTTP/1.1, HTTP/2 & HTTP/3

What is HTTP/3, and what does QUIC improve over HTTP/2 on TCP?

HTTP/3 is HTTP running on QUIC. QUIC is a transport protocol that runs over UDP and has TLS 1.3 built in.

What QUIC improves over HTTP/2 on TCP:

  • Independent streams: QUIC handles streams itself. A lost packet on one stream only delays that stream. This removes the TCP-level head-of-line blocking that HTTP/2 still has.
  • Faster handshakes: QUIC combines the transport and TLS handshakes. A new connection needs one round trip (1-RTT). A resumed connection can send data with no wait (0-RTT).
  • Connection migration: a connection ID identifies each connection, not the IP and port. So a phone moving from Wi-Fi to mobile data can keep the same connection.
  • QPACK: this header compression is adapted from HPACK, so it works when packets arrive out of order.

Clients usually find out about HTTP/3 from an Alt-Svc header on an HTTP/2 response. If UDP is blocked, they fall back to TCP.

  • HTTP/3 runs on QUIC, which uses UDP and has TLS 1.3 built in.
  • Independent streams remove TCP head-of-line blocking.
  • Handshakes are faster: 1-RTT for new connections, 0-RTT on resumption.
  • Connection IDs let a connection survive a network change.
  • Clients find HTTP/3 through Alt-Svc and fall back to TCP if UDP is blocked.