Skip to main content

HTTP/1.1 vs HTTP/2 vs HTTP/3 Lab

Load one page over HTTP/1.1, HTTP/2, and HTTP/3. Compare connection setup, multiplexed streams, TCP head-of-line blocking, and QUIC loss recovery in a request waterfall.

Category: Networking

What You Will Learn

  • Compare HTTP/1.1 connection queues with HTTP/2 and HTTP/3 stream multiplexing
  • Account for TCP and TLS setup round trips before an HTTP request can start
  • See why TCP packet loss can block every HTTP/2 stream on one connection
  • See how QUIC lets HTTP/3 recover a lost stream without blocking the others
  • Read a request waterfall in milliseconds and round trips

Topics covered: http, http/2, http/3, quic, tcp, networking, web performance, interactive

// simulator

HTTP/1.1 vs HTTP/2 vs HTTP/3 Lab

Load one page over HTTP/1.1, HTTP/2, and HTTP/3. Compare connection setup, multiplexed streams, TCP head-of-line blocking, and QUIC loss recovery in a request waterfall.

Supported byBecome a sponsor
BitriseAtomsizedDigitalOceanDevDojoSMTPfastQuizAPI

HTTP/1.1 is ready at 100 ms RTT.

HTTP/1.1 · 100 ms RTT
0/5

Load step: Connect

Goal: Load the page over HTTP/1.1 and count the connections. Pick HTTP/1.1 and press Play all. Browsers open up to six connections to one origin; the other requests wait in line.

Load controls

13 requests on 20 Mbit/s
Round-trip time

Request waterfall

HTTP/1.1 over TCP + TLS 1.3, 6 connections.

about 768 ms, 7.7 RTT
  • connection setup
  • waiting
  • HTML
  • CSS
  • JS
  • images
  • lost packet, waiting for the resend
Connect: HTTP/1.1

2 round trips complete transport setup before the first request.

A simplified model: DNS, server work, congestion control, packet sizes, priorities, caches, and connection reuse across navigations are out of scope.

About the HTTP/1.1 vs HTTP/2 vs HTTP/3 Lab

What you'll practise

  • Reading connection setup, queueing, and receiving time in a request waterfall
  • Comparing browser HTTP/1.1 connection limits with stream multiplexing
  • Recognising TCP head-of-line blocking when one HTTP/2 packet is lost
  • Seeing why independent QUIC streams let HTTP/3 isolate that loss

How it works

  • The lab loads one HTML document, then twelve CSS, JavaScript, and image assets on a fixed link.
  • It compares serial requests over browser HTTP/1.1 connections with multiplexed HTTP/2 and HTTP/3 streams.
  • A fixed lost model packet carries the second half of app.js and recovers after one extra round trip.
  • A simplified model: DNS, server work, congestion control, priorities, caches, header compression, server push, and QUIC zero-RTT resumption are out of scope.

Sources

Overview

HTTP/1.1, HTTP/2 and HTTP/3 move the same bytes, but they differ in how many connections they open, how many round trips they spend before the first request, and what one lost packet costs. This lab loads the same page, one HTML document and twelve assets, over each version on a 20 Mbit/s link and draws every request in a waterfall. HTTP/1.1 sends one request at a time per connection, so the browser opens up to six connections to the origin and the other requests wait in line, each paying a full round trip. HTTP/2 multiplexes every request as a stream over one TCP connection, so all assets are requested at once. Both need two round trips before the first request: one for the TCP handshake and one for TLS 1.3. HTTP/3 runs over QUIC, which combines the transport and TLS 1.3 handshakes into one round trip. Raise the round-trip time from 20 to 250 ms and the gap grows, because for a small page latency matters more than bandwidth. Turn on packet loss and the difference becomes visible: TCP delivers bytes in order, so on HTTP/2 every stream still receiving waits for the resent packet, while QUIC holds back only the stream that lost it. The model is deliberately simple and leaves out DNS, congestion control and 0-RTT resumption.

Try this

  1. Pick HTTP/1.1 and 250 ms, press Play all, and count the six connection lanes and the requests queued behind them.
  2. Press Play all on HTTP/2 and then on HTTP/3 at the same round-trip time, and compare when the first request starts and when the last byte arrives.
  3. Turn on Lose one packet and press Play all on HTTP/2 and then on HTTP/3 to see how many streams stall in each.

Frequently asked questions

Why is HTTP/2 faster than HTTP/1.1?
HTTP/1.1 handles one request at a time on each connection, so browsers open several connections and still queue requests, paying a round trip for each. HTTP/2 multiplexes all requests as streams over one connection, so the whole page can be requested at once. The gain is largest when the round-trip time is high.
What is head-of-line blocking in HTTP/2?
HTTP/2 removes head-of-line blocking at the HTTP layer, but all its streams share one TCP byte stream. When a packet is lost, TCP holds back every later byte until the retransmission arrives, so streams that lost nothing wait too. QUIC, under HTTP/3, delivers each stream independently.
How does HTTP/3 save a round trip?
HTTP/3 runs over QUIC, which carries the TLS 1.3 handshake inside its own handshake. A new connection is ready after one round trip instead of two for TCP plus TLS 1.3, and a resumed connection can even send its first request with 0-RTT data.
Why do browsers open six connections for HTTP/1.1?
The limit is a browser convention, not part of the HTTP/1.1 specification: Chrome and Firefox open up to six connections per origin. It gives some parallelism without overloading servers. HTTP/1.1 pipelining exists in the specification, but browsers do not use it.

Try next

Sponsored
Carbon Ads