Log inStart free
LESSON 33.22 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

HTTP/1.1 vs HTTP/2 vs HTTP/3

Six streamed answers share one network in three versions of HTTP.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 33.22 · HTTP BAYHTTP/1.1 · POOL 2 · LAST ANSWER 39.94 S
01
Stage 1 of 5 · One by one
Over HTTP/1.1, a connection carries one request at a time. 4 of 6 requests wait behind an answer: head-of-line blocking.
Explain it simply

Each row is one request from the batch job. The dashed grey bar is time spent waiting for a free connection. The blue ticks are the answer arriving, 4 tokens at a time. A request can't use a connection until the answer before it has fully arrived. It's like checkout lanes with one shopper per lane and a queue.

HTTP/1.1, pool of 2: 4 of 6 requests wait. The last answer ends at 39.94 s.

requestshandshakeswaitinganswer packetslost, frozen
time4 s8 s12 s16 s20 s24 s28 s32 s36 s40 sHTTP/1.1 · pool of 2ends 39.94 s · 2 handshakesR03C114.81R04C214.00R05C225.22R06C128.14R08C238.33R09C139.94time4 s8 s12 s16 s20 s24 s28 s32 s36 s40 sHTTP/1.1 · pool of 2ends 39.94 s · 2 handshakesR03C114.81R04C214.00R05C225.22R06C128.14R08C238.33R09C139.94
Toy: K2's burst of 6 requests (33.C4), streamed at 40 tokens/s
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
tsend=max⁡(ai, tfree)\sy{ts}{data}{t_{\text{send}}} = \max(\sy{a}{data}{a_i},\ \sy{tf}{param}{t_{\text{free}}})
tsend(R09)=max⁡(5.25, 28.14)=28.14 st_{\text{send}}(\text{R09}) = \max(5.25,\ 28.14) = 28.14\text{ s}

A request leaves once it has arrived and a connection is free.

Common mix-ups

MYTHHTTP/2 ends head-of-line blocking.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With a pool of 6 connections, how many handshakes does HTTP/1.1 pay?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 3 live controls
  • 2 mix-up cards and 3 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.