The idea
Three HTTP versions, one request: what changes on the wire from HTTP/1.1 to HTTP/2 and HTTP/3. The laptop fetches pages through homeRouter from webServer, which speaks all three on Port 443.
Steps
-
HTTP/2: the same request, in frames
Text lines are slow for a machine to parse, so HTTP/2 sends the same request as binary frames over one TCP connection. Fetch the page over HTTP/2, then with
nghttp, which prints what crosses the wire.laptop:~# curl -sv --http2 https://webServer.lab/ laptop:~# nghttp -nv https://webServer.lab/
-
Six files: six connections, or one
A page needs many files, and each new connection costs a handshake before its first byte. curl fetches six style sheets at once over HTTP/1.1 while the laptop counts new TCP connections. Then fetch the same six over HTTP/2.
laptop:~# curl -s --http1.1 -Z -o '/tmp/#1.css' -w '%{http_version}\n' 'https://webServer.lab/assets/{1,2,3,4,5,6}.css' laptop:~# curl -s --http2 -Z -o '/tmp/#1.css' -w '%{http_version}\n' 'https://webServer.lab/assets/{1,2,3,4,5,6}.css'
Pro
3 more steps in the app
- HTTP/3: the same streams over QUIC
- Finding HTTP/3, and falling back
- When UDP 443 is blocked