How does http/1.1 work?
Why are requests so expensive?
1: HTTP/1.1 uses TCP poorly
HTTP flows are short & bursty,
TCP is built for long-lived flows
When your HTML needs a file, the client
opens a TCP connection to the server through HTTP.
The server responds, says, "yeah, here's the file," and starts sending chunks of the file until the client has the whole thing.
The client, after it has everything, says "thanks",
and closes the TCP connection.
2: TCP connections exhibit a slowstart when opened
This means every time a TCP connection is opened,
it takes a few packets until the TCP connection
has reached throughput peak.
Slow start exists to combat network congestion,
double-edged performance sword
TCP Slowstart
Typical requests per page
Late 2014: average of 90-100 @ 1.5mb
2010: average of 55-65 @ 600k
3: Browsers "guess"
State of the Art: Browsers allow 4-8 open,
active connections at a time.
TCP Head of Line Blocking
Networks become congested if more connections
are active (congestion control is your friend)
HTTP/1.1 isn't designed to identify what files are
important on the client end; very confusing about
where responsibilities lie.
So
HTTP/1.1 doesn't use TCP right
Because of that, TCP slowstart kicks in very often
And browsers need to make educated guesses
about a lot of stuff
Let's talk & drink beers!
William M. Riley: @bill_riley
Grain & Mortar: @grainandmortar
AIGA Nebraska: @AIGA_nebraska
Midwest Dev Chat: http://midwestdevchat.com
Midwest Design Chat: No site yet, ask me if you'd like to join!
Hubdia: @hubdia
Tapped: http://tappedapp.co