← Eren Korkmaz

This site fits in one round trip

The homepage is 4.8 kB compressed, styles included. A server may send about 14 kB before it has to stop and wait for your computer to answer. Anything under that line arrives at once.

youpaintedserverSYNSYN-ACKGET /
This site. Handshake, request, four packets, painted.
youwaitingserverSYNSYN-ACKGET /ACKACKACK10, then 20, then 40 … five more round trips to go
A typical 2.5 MB page, on the same clock. Every flight waits for the last one to be acknowledged.

Why 14 kB

A new TCP connection doesn't know how fast the path between two machines is, so it starts carefully. The server sends ten packets of 1,460 bytes, 14,600 bytes in all, then waits to hear that they arrived. When they have, it sends twenty. Then forty. This is slow start, and the opening ten comes from RFC 6928.

Every wait is a full round trip: 20 ms to a server nearby, 150 ms across an ocean, worse on a phone. A 2.5 MB page needs about eight of them before its last byte lands, and that is before the stylesheets, fonts and scripts it then asks for. A page under 14 kB needs one. No amount of bandwidth fixes this, because the time is spent waiting, not sending.

What is in the first flight

HTML and CSS, 4.8 kB portrait, 4.1 kB unused, of 14.6 kB