HTTP/2An Overview In Three Acts
HTTP/1.xWhat’s wrong anyways?
Optional parts
e.g. “Pipelineing”
3
4
Browser
Server
GET /
200 OK
GET /favicon.ico
200 OK
5
Browser
Server
GET /
200 OK
GET /favicon.ico
200 OK
Bad TCP useage
e.g. header fill TCP frame, but what’s with the content?
e.g. headers larger than content
6
while (time++) {

PageSize++

NumberOfObjects++

}
more objects per website (e.g. css, js, imgs)

bigger objects per website (e.g. hi-res retina images, 4k videos)
more requests after initial load (e.g. 3rd party content)
7
8
9
Bad Deal With
Latency
2G: 300-1000 ms

3G: 100-500 ms

4G: <100 ms
10
We “FIX” it!
Sprites, Inlining, Concatenation, Sharding,

Minification (aka Obfuscation)
11
12
HTTP/2Everything’s hunky-dory or what?
Fix & Preserve
Same High-Level Protocol.
New Wire-Level Protocol.
15
Fix & Preserve
less RTT sensitive
(and therefore less sensitive to latency)
16
Fix & Preserve
one connection (per remote) to rule them all
17
Fix & Preserve
pipelining that just works
18
Fix & Preserve
same schema (“http://“)
19
Fix & Preserve
same semantics

same actions: GET, POST, PUT, DELETE, …

same headers: Accept-Language, Cookie, …
20
Fix & Preserve
roughly same “high-level” interfaces
e.g. curl command line
21
Fix & Preserve
no optional parts
22
Fix & Preserve
no minor versions
it’s just “HTTP/2”
…and the next one will be “HTTP/3”
23
SPDY/3
the “mother” of HTTP/2
developed by Google
tested by Google, Facebook, Twitter, …
supported by Chrome and Firefox
24
HTTP/2 w/ TLS
Application Layer Protocol Negotiation (ALPN)
- extra Field in TLS
- like Server Name Indication (SNI)
25
HTTP/2 w/o TLS
send “Upgrade:” header in HTTP/1.1 request
(eventually) receive “101 SWITCHING” response
- like Websockets
- extra roundtrip
26
It’s binary.
And that’s a good thing.
Simpler alignment to TCP frames.
(Learn Wireshark & cURL)
27
Multiplexing
true parallel requests through multiple streams
out of order responses
flow control
28
Stream Priority
dynamically adjustable
connections have same priority on the server
e.g. Chat Stream > Voice Stream > Video Stream
29
Header
Compression
HPACK against CRIME
Static Dictionary, Dynamic Dictionary, Huffman Encoding
30
Server Push
The “Amazon Concept”:

If you like this, you probably like that and that as well.
31
Extensions
e.g. "Alt-Srv" Header (RFC7838)
32
TOOLS(Still) A Construction Site.
Clients
✓ IE since 11
✓ Firefox since 35 (only TLS)
✓ Chrome since 40 (only TLS)
✓ Safari since 10 (only TLS)
✓ cURL & libcurl
34
35
HTTPDs
Apache: ✓
Nginx: ✓
✓ h2o ✓ nghttp2
✓ many more
36
Proxies
✓ Squid
✓ Varnish
✓ Apache Traffic Server
HaProxy: 🤔
37
Ruby
✓ (Pure) Ruby Clients
- http-2 & net-http2
- nothing Faraday compatible
No Servers!
- No Plans
- Rack unfit for HTTP/2
38
Services
✓ Akamai, CloudFlare, Fastly

✓ Google Appengine, AWS CloudFront, Azure CDN,
✓ Google, Twitter, Facebook, tumblr, instagram, Wikipedia
✓ digitec.ch,
✓ Apple Push Notification Service (v2)
39
TAKE-AWAYs
HTTP/2 is real, ready and here to stay.
HTTP/2 is best with TLS.
HTTP/2 servers, proxies and clients are ready.
Stop HTTP/1.1 hacks (w/ HTTP/2).
No-Show w/ Ruby 😢
(Go is ready. Python is ready. Node is ready. Java is ready. Event .NET is ready!)
CREDITS
Background Images:
Under CC-Zero License
from unsplash.com by various photographers
Information:
Book “High Performance Network Browsing”
Ilya Grigorik, 2013, O’Reilly
Paper “http2 explained”
Daniel Stenberg, 2015, Internet Archive
Video "An overview of HTTP/2”
Daniel Sommermann, 2014, YouTube
41
Further Information
See CREDITS.
Website http2.github.io.
Website http2.akamai.com.
HTTP/2 RFC 7540.
HPACK RFC 7541.
42

HTTP/2 (2017)