Http/2
Why Change HTTp?
The WEb Changed
HTTP/1.1 RFC is 15~ years old (June 1999)
Heavier
More Interactive
Mobile
Internet of Things
Performance
=
Attention
=
$$$
Eliminate Requests
Techniques
Spriting
Inlining
Concatenation
Sharding
these are technically
Indications that the underlying technology can be better
Hacks
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
TCP is built for long-lived flows
When your HTML needs a file, the client
opens a TCP connection to the server through HTTP.
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.
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)
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.
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
about a lot of stuff
WHAT IS HTTP/2?
Initially a Rewrite of RFC 2616 (HTTP/1.1)
Google did SPDY, brought it to the IETF, and it became
HTTP/2 (RFC 7540) as of May 15, 2015 (4+ years work)
HTTP/2 (RFC 7540) as of May 15, 2015 (4+ years work)
For: Clarity, speed, cleanups, security, much more.
TECHNICAL goal
Take advantage of one TCP connection
backward incompatible
HOW DOES
HTTP/2
WORK?
The idea is everything is sent in one TCP connection
Everything should work like normal, but with
new features and behaviors
new features and behaviors
Features
Features
Prioritization
Flow Control
Header Compression through HPAC
TLS will be mandatory
Questions?
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
Http/2 (SPDY)
By bill_riley
Http/2 (SPDY)
- 1,871