Before you start. This series builds a small copy of a web server: a program that sits waiting on the network, reads one request (one question, like “give me this page”), and writes back an answer. So far the toy can already tell exactly where one request ends and the next would begin (HTTP 03: Frame The Body), and it can read a request, work out what it is asking for, and answer it once before closing the line (Parse The Request (HTTP), HTTP 04: Routing and Response). If the handshake that opens a connection is unfamiliar, TCP vs UDP, and the 3-way handshake in Networking shows it in one read.
Lesson 18 of 117 in From Scratch
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
Or start free: a free account opens lessons 2 and 3 of every track.
In this lesson
October 1986: a line eight hundred times slower, overnight
The click: stop hanging up between questions
What one hang-up actually costs
Which side hangs up first?
The bug that answers a question nobody asked
The handshake and slow start, priced exactly
The version split, exactly
The framing bug, in full
The loop, in full
Pipelining: the optimisation that lost
The idle timeout is a resource decision
Terms it explains: twice, in, out, three different endings, a cap on reuse, deadlines on both directions, lower, in request order, head-of-line blocking, several connections per origin, Slowloris.