HTTP/2: What no one is telling you

Fastly
FastlyFastly
Hooman Beheshti
VP Technology
HTTP/2:
What no one’s telling you
some people are
starting to tell you!
Hooman Beheshti
VP Technology
HTTP/2:
What no one’s telling you
Everything will be
much faster!
You don’t need
to change
anything!
Google said
so!
You can stop
doing
optimizations!
2 > 1.1
Goals
•  Take an objective look at the protocol
•  Practical considerations
•  Share data
•  Better understand the good
–  And the bad?
HTTP/2
RFC 7540
Binary protocol
Connection
connection
A single connection
•  single, long-lasting TCP connection
•  Theoretically, this means better congestion
management between peers
•  TLS (with ALPN)
•  Connection reuse across domains (same IP and cert)
Streams
connection
stream
stream
stream
…
Streams
•  Virtual channels for communication
–  Translate roughly to a request/response exchange
–  Client or server can initiate or terminate
•  Stream IDs:
–  Client: odd; server: even; 0: reserved
–  Each ID has to be larger than the ones before it initiated
by the endpoint
–  Cannot be reused
Frames
connection
stream
stream
stream
…	
frame frame frame frame
frame frame frame frame
frame frame frame
frame frame frame
frame frame
frame frame frame
GET /thing HTTP/1.1
Host: www.example.com
User-Agent: Some_user_agent
HTTP/1.1 200 OK
Server: some_server
Content-Type: text/html
Content-Length: 1000
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
Request Response
GET /thing HTTP/1.1
Host: www.example.com
User-Agent: Some_user_agent
HTTP/1.1 200 OK
Server: some_server
Content-Type: text/html
Content-Length: 1000
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
HEADERS
Request Response
GET /thing HTTP/1.1
Host: www.example.com
User-Agent: Some_user_agent
HTTP/1.1 200 OK
Server: some_server
Content-Type: text/html
Content-Length: 1000
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
HEADERS
HEADERS
Request Response
GET /thing HTTP/1.1
Host: www.example.com
User-Agent: Some_user_agent
HTTP/1.1 200 OK
Server: some_server
Content-Type: text/html
Content-Length: 1000
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
html html html html html html
DATA
DATA
DATA
DATA
DATA
DATA
HEADERS
HEADERS
Request Response
DATA Carries request or response data
HEADERS
Carries request/response headers/trailers; can initiate a
stream
PRIORITY Indicates priority of a stream
RST_STREAM Terminates a stream
SETTINGS Defines parameters for the connection only
PUSH_PROMISE Signals peer for server push
PING Maintenance frame for checking RTT, connection, etc
GOAWAY For shutting down a connection
WINDOW_UPDATE Frame responsible for flow control adjustments
CONTINUATION Extends a HEADERS frame and can carry more headers
DATA Carries request or response data
HEADERS
Carries request/response headers/trailers; can initiate a
stream
PRIORITY Indicates priority of a stream
RST_STREAM Terminates a stream
SETTINGS Defines parameters for the connection only
PUSH_PROMISE Signals peer for server push
PING Maintenance frame for checking RTT, connection, etc
GOAWAY For shutting down a connection
WINDOW_UPDATE Frame responsible for flow control adjustments
CONTINUATION Extends a HEADERS frame and can carry more headers
Protocol flow
HTTP/1
connection
request
response
HTTP/2
connection
(sid=1)
DATA
(sid=1)
DATA
(sid=1)
DATA
(sid=1)
HEADERS
(sid=1)
HEADERS
HTTP/1
connection
request
response
connection
request
response
HTTP/1
connection
request
response
connection
request
response
connection
request
response
HTTP/2
connection
(sid=3)
DATA
(sid=1)
DATA
(sid=5)
HEADERS
(sid=3)
DATA
(sid=1)
HEADERS
(sid=3)
HEADERS
(sid=11)
HEADERS
(sid=13)
HEADERS
(sid=15)
HEADERS
(sid=13)
DATA
(sid=13)
DATA
(sid=17)
HEADERS
HTTP/2: What no one is telling you
HTTP/1.1
HTTP/1.1 HTTP/2
HTTP/2: What no one is telling you
http://caniuse.com/#search=http2
Servers
•  Apache & Nginx
•  h2o
–  https://h2o.examp1e.net/
•  https://en.wikipedia.org/wiki/HTTP/2
•  Talk to your CDNs
Performance
The perfect page
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
Private WebpageTest
5Mbps/1Mbps; 40ms latency
Chrome; h1 vs h2
Private WebpageTest
5Mbps/1Mbps; 40ms latency
Chrome; h1 vs h2
~270 runs each!!
HTTP/2: What no one is telling you
Packet Loss!
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
Firefox
HTTP/2: What no one is telling you
Slow 3G:
780Kbps/330Kbps
200ms latency
Firefox; Slow 3G: 780Kbps/330Kbps, 200ms latency
Firefox; 5Mbps/1Mbps, 40ms latency
5Mbps/1Mbps, 40ms latency
 
 
 
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
DocComplete h2 h2 h2 h2 h1 h1 h1 h1
Keeping score…
 
 
 
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
DocComplete h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1 h2 h1 h1 h1 h2 h1
Speed Index h2/h1 h2 h2 h2 h1 h1 h2 h2
Keeping score…
Why?
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
Head of line blocking in TCP
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
Real pages
Real pages
•  8 pages (from 8 real sites)
•  16 bandwidth/latency combinations
–  Each with 0%, 0.5%, 1%, 2% PLR
•  Firefox and Chrome, TLS only, collect all metrics
•  300-400 runs with each combination
Real pages
•  8 pages (from 8 real sites)
•  16 bandwidth/latency combinations
–  Each with 0%, 0.5%, 1%, 2% PLR
•  Firefox and Chrome, TLS only, collect all metrics
•  300-400 runs with each combination
HTTP/2: What no one is telling you
Analysis
•  3 Types of pages, # of resources h1àh2:
–  ~75% or higher
–  ~half
–  ~25% or lower
•  2 profiles (0%, 0.5%, 1%, 2% PLR):
–  “Broadband”: 5Mbps/1Mbps/40ms
–  “Slow 3G”: 780Kbps/330Kbps/200ms
•  3 Metrics
–  Document Complete
–  DOM Content Loaded Start
–  Speed Index
Site1: Fastly customers page
130-135 requests to onload (~3MB)
~99 requests h1àh2 (2.5MB)
HTTP/2: What no one is telling you
Site1; DocComplete; 5Mbps/1Mbps/40ms
Site1; DCL; 5Mbps/1Mbps/40ms
Site1; Speed Index; 5Mbps/1Mbps/40ms
Site1; DocComplete; 780Kbps/330Kbps/200ms
Site1; DCL; 780Kbps/330Kbps/200ms
***
Site1; Speed Index; 780Kbps/330Kbps/200ms
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site2
90-100 requests to onload (~1.7MB)
~47 requests h1àh2 (1.2MB)
HTTP/2: What no one is telling you
Site2; DocComplete; 5Mbps/1Mbps/40ms
Site2; DCL; 5Mbps/1Mbps/40ms
Site2; Speed Index; 5Mbps/1Mbps/40ms
Site2; DocComplete; 780Kbps/330Kbps/200ms
Site2; DCL; 780Kbps/330Kbps/200ms
Site2; Speed Index; 780Kbps/330Kbps/200ms
***
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
     
Site2
DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1
Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site3
176-212 requests to onload (~3.5MB)
~45-55 requests h1àh2 (2MB)
HTTP/2: What no one is telling you
Site3; DocComplete; 5Mbps/1Mbps/40ms
***
Site3; DCL; 5Mbps/1Mbps/40ms
Site3; Speed Index; 5Mbps/1Mbps/40ms
Site3; DocComplete; 780Kbps/330Kbps/200ms
Site3; DCL; 780Kbps/330Kbps/200ms
Site3; Speed Index; 780Kbps/330Kbps/200ms
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
     
Site2
DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1
Speed Index h1 h2 h1 h2 h1 h2 h1 h2
     
Site3
DocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1b
DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1
Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1c
DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1
Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2a
DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1
Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2b
DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2
Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3a
DocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3b
DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3c
DocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1
Speed Index h1 h2 h2 h2 h2 h2 h2 h2
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1b
DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1
Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1c
DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1
Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2a
DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1
Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2b
DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2
Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3a
DocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3b
DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3c
DocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1
Speed Index h1 h2 h2 h2 h2 h2 h2 h2
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1b
DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1
Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1c
DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1
Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2a
DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1
Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2b
DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2
Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3a
DocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3b
DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3c
DocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1
Speed Index h1 h2 h2 h2 h2 h2 h2 h2
0% PLR 2% PLR
5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a
(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1
DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1b
DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1
Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1c
DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1
Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2a
DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1
Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2b
DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2
Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3a
DocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3b
DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2
Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3c
DocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1
Speed Index h1 h2 h2 h2 h2 h2 h2 h2
Trends?
•  Metrics later in the page seem to get affected more
by packet loss (?)
•  Lots of exceptions
–  Sometimes h2 holds up even under loss conditions
–  Sometimes h1 wins even when there’s no loss
•  Firefox and Chrome don’t always behave the same
PLR in the real world
HTTP/2: What no one is telling you
Some reading…
•  http://c3lab.poliba.it/images/3/3b/QUIC_SAC15.pdf
•  https://www.usenix.org/system/files/conference/nsdi14/nsdi14-paper-
wang_xiao_sophia.pdf
•  http://arxiv.org/pdf/1507.06562v1.pdf
•  http://nl.cs.montana.edu/lab/publications/Goel_H2_extended.pdf
•  https://99designs.com.au/tech-blog/blog/2016/07/14/real-world-
http-2-400gb-of-images-per-day/
Now what?
Caution!
•  we’re not going to draw big conclusions, other than:
–  Packet loss seems to matter
–  h2 isn’t always faster!
•  This was all simulated
–  PLR is different in the real world
–  Users have a mix of connection profiles
–  Nothing beats real world data
•  Your mileage may (and will) vary
Don’t listen to anyone!!
Don’t listen to anyone!!
https://speakerdeck.com/patrickhamann/http2-what-where-why-and-when-smashing-conference-march-2016
https://speakerdeck.com/patrickhamann/http2-what-where-why-and-when-smashing-conference-march-2016
https://github.com/fastlyhoo/wpt_h1vsh2
https://github.com/fastlyhoo/wpt_h1vsh2
QUIC
HTTP/2: What no one is telling you
Server push
Server push basics
•  Ability to “push” a resource to the client before
the client requests it
–  And before the client knows it needs it
–  Only servers can push
•  Hop-by-hop
SETTINGS
PUSH_PROMISE
connection
HEADERS (sid=1)
GET /index.html
time
DATA (sid=2) DATA (sid=1) DATA (sid=2)
DATA (sid=2) DATA (sid=2)HEADERS (sid=2)
PUSH_PROMISE(sid=1)
Promised sid=2
GET /css1.css
<request headers>
DATA (sid=1) DATA (sid=1) DATA (sid=1)HEADERS (sid=1)
HTTP/2: What no one is telling you
HTTP/2: What no one is telling you
Server Push
•  What do we push?
–  Outside the scope of the protocol
•  Push and browser caches don’t necessarily play
well together
–  RST_STREAM ?
–  Even if the browser rejected, it’s too late
No push – first view
No push – repeat view
Push – first view
Pushed
Push – repeat view
Pushed
Use cases
Essential resources for this page
•  Similar to <Link rel=“preload”>
•  Save 1xRTT
Push:	
No Push:
Push during server think time
•  Push assets to the browser while the server is
“thinking”
–  Backend processing
–  Time to deliver HTML from origin through a CDN
HTTP/2: What no one is telling you
Push during server think time
•  Push assets to the browser while the server is
“thinking”
–  Backend processing
–  Time to deliver HTML from origin through a CDN
•  https://blog.yoav.ws/being_pushy/
•  This isn’t a trivial thing to do; ask your CDN
about support
Next navigation?
h$ps://w3c.github.io/resource-hints/
We still have some questions
•  What do we push?
–  Still unclear…
–  https://docs.google.com/document/d/
1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/
edit
•  What if it’s already in the browser cache?
–  H2O: CASPER
–  Cache Digests:
•  https://tools.ietf.org/html/draft-ietf-httpbis-cache-digest-00
Other use cases?
h$ps://www.facebook.com/atscaleevents/videos/1775942979345465/
HPACK
HPACK (RFC 7541)
•  Addresses the header bloat problem
•  Two primary mechanisms
–  All headers (name=value) are Huffman encoded
–  Indexed tables at each peer
Tables
•  Static table
–  Defined by the RFC, never changes
•  Dynamic table
–  Built during the connection and maintained by each
side
–  FIFO
+-------+-----------------------------+---------------+
| Index | Header Name | Header Value |
+-------+-----------------------------+---------------+
| 1 | :authority | |
| 2 | :method | GET |
| 3 | :method | POST |
| 4 | :path | / |
| 5 | :path | /index.html |
| 6 | :scheme | http |
| 7 | :scheme | https |
| 8 | :status | 200 |
| 9 | :status | 204 |
| 10 | :status | 206 |
| 11 | :status | 304 |
| 12 | :status | 400 |
| 13 | :status | 404 |
| 14 | :status | 500 |
| 15 | accept-charset | |
| 16 | accept-encoding | gzip, deflate |
| 17 | accept-language | |
| 18 | accept-ranges | |
| 19 | accept | |
| 20 | access-control-allow-origin | |
| 21 | age | |
| 22 | allow | |
| 23 | authorization | |
| 24 | cache-control | |
| 25 | content-disposition | |
| 26 | content-encoding | |
| 27 | content-language | |
| 28 | content-length | |
| 29 | content-location | |
| 30 | content-range | |
+-------+-----------------------------+---------------+
Table 1: Static Table Entries
+-------+-----------------------------+---------------+
| Index | Header Name | Header Value |
+-------+-----------------------------+---------------+
| 31 | content-type | |
| 32 | cookie | |
| 33 | date | |
| 34 | etag | |
| 35 | expect | |
| 36 | expires | |
| 37 | from | |
| 38 | host | |
| 39 | if-match | |
| 40 | if-modified-since | |
| 41 | if-none-match | |
| 42 | if-range | |
| 43 | if-unmodified-since | |
| 44 | last-modified | |
| 45 | link | |
| 46 | location | |
| 47 | max-forwards | |
| 48 | proxy-authenticate | |
| 49 | proxy-authorization | |
| 50 | range | |
| 51 | referer | |
| 52 | refresh | |
| 53 | retry-after | |
| 54 | server | |
| 55 | set-cookie | |
| 56 | strict-transport-security | |
| 57 | transfer-encoding | |
| 58 | user-agent | |
| 59 | vary | |
| 60 | via | |
| 61 | www-authenticate | |
+-------+-----------------------------+---------------+
Table 1: Static Table Entries
Performance benefits
Performance benefits
Bytes BrowseràServer
Performance benefits
Bytes BrowseràServer	
Bytes BrowseràServer
https://blogs.dropbox.com/tech/2016/05/enabling-http2-for-dropbox-web-services-experiences-and-observations/
HPACK – things to know
•  Default size is 4K
–  For the entire dynamic table
–  Site-wide headers proposal:
•  https://tools.ietf.org/html/draft-nottingham-site-wide-headers-00
•  Compression context is set per connection
–  New connection starts from scratch with static table and builds new dynamic table
•  An attack vector
–  https://www.imperva.com/docs/Imperva_HII_HTTP2.pdf
•  Can’t turn it off
–  Without it, pipelining would be very difficult
content-security-policy: script-src https://connect.facebook.net https://cm.g.doubleclick.net
https://ssl.google-analytics.com https://graph.facebook.com https://twitter.com 'unsafe-eval'
https://*.twimg.com https://api.twitter.com https://analytics.twitter.com https://
publish.twitter.com https://ton.twitter.com 'unsafe-inline' https://syndication.twitter.com
https://www.google.com https://t.tellapart.com https://platform.twitter.com https://www.google-
analytics.com 'self'; font-src https://twitter.com https://*.twimg.com data: https://
ton.twitter.com https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com https://
netdna.bootstrapcdn.com 'self'; media-src https://twitter.com https://*.twimg.com https://
ton.twitter.com blob: 'self'; connect-src https://graph.facebook.com https://*.giphy.com
https://*.twimg.com https://api.twitter.com https://pay.twitter.com https://
analytics.twitter.com https://media.riffsy.com https://upload.twitter.com https://
api.mapbox.com 'self'; style-src https://fonts.googleapis.com https://twitter.com https://
*.twimg.com https://translate.googleapis.com https://ton.twitter.com 'unsafe-inline' https://
platform.twitter.com https://maxcdn.bootstrapcdn.com https://netdna.bootstrapcdn.com 'self';
object-src https://twitter.com https://pbs.twimg.com; default-src 'self'; frame-src https://
staticxx.facebook.com https://twitter.com https://*.twimg.com https://
5415703.fls.doubleclick.net https://player.vimeo.com https://pay.twitter.com https://
www.facebook.com https://ton.twitter.com https://syndication.twitter.com https://vine.co
twitter: https://www.youtube.com https://platform.twitter.com https://upload.twitter.com
https://s-static.ak.facebook.com 'self' https://donate.twitter.com; img-src https://
graph.facebook.com https://*.giphy.com https://twitter.com https://*.twimg.com data: https://
lumiere-a.akamaihd.net https://fbcdn-profile-a.akamaihd.net https://www.facebook.com https://
ton.twitter.com https://*.fbcdn.net https://syndication.twitter.com https://media.riffsy.com
https://www.google.com https://stats.g.doubleclick.net https://*.tiles.mapbox.com https://
www.google-analytics.com blob: 'self'; report-uri https://twitter.com/i/csp_report?
a=NVQWGYLXFVZXO2LGOQ%3D%3D%3D%3D%3D%3D&ro=false;
content-security-policy: script-src https://connect.facebook.net https://cm.g.doubleclick.net
https://ssl.google-analytics.com https://graph.facebook.com https://twitter.com 'unsafe-eval'
https://*.twimg.com https://api.twitter.com https://analytics.twitter.com https://
publish.twitter.com https://ton.twitter.com 'unsafe-inline' https://syndication.twitter.com
https://www.google.com https://t.tellapart.com https://platform.twitter.com https://www.google-
analytics.com 'self'; font-src https://twitter.com https://*.twimg.com data: https://
ton.twitter.com https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com https://
netdna.bootstrapcdn.com 'self'; media-src https://twitter.com https://*.twimg.com https://
ton.twitter.com blob: 'self'; connect-src https://graph.facebook.com https://*.giphy.com
https://*.twimg.com https://api.twitter.com https://pay.twitter.com https://
analytics.twitter.com https://media.riffsy.com https://upload.twitter.com https://
api.mapbox.com 'self'; style-src https://fonts.googleapis.com https://twitter.com https://
*.twimg.com https://translate.googleapis.com https://ton.twitter.com 'unsafe-inline' https://
platform.twitter.com https://maxcdn.bootstrapcdn.com https://netdna.bootstrapcdn.com 'self';
object-src https://twitter.com https://pbs.twimg.com; default-src 'self'; frame-src https://
staticxx.facebook.com https://twitter.com https://*.twimg.com https://
5415703.fls.doubleclick.net https://player.vimeo.com https://pay.twitter.com https://
www.facebook.com https://ton.twitter.com https://syndication.twitter.com https://vine.co
twitter: https://www.youtube.com https://platform.twitter.com https://upload.twitter.com
https://s-static.ak.facebook.com 'self' https://donate.twitter.com; img-src https://
graph.facebook.com https://*.giphy.com https://twitter.com https://*.twimg.com data: https://
lumiere-a.akamaihd.net https://fbcdn-profile-a.akamaihd.net https://www.facebook.com https://
ton.twitter.com https://*.fbcdn.net https://syndication.twitter.com https://media.riffsy.com
https://www.google.com https://stats.g.doubleclick.net https://*.tiles.mapbox.com https://
www.google-analytics.com blob: 'self'; report-uri https://twitter.com/i/csp_report?
a=NVQWGYLXFVZXO2LGOQ%3D%3D%3D%3D%3D%3D&ro=false;
2.2KB
HPACK – things to know
•  Default size is 4K
–  For the entire dynamic table
–  Site-wide headers proposal:
•  https://tools.ietf.org/html/draft-nottingham-site-wide-headers-00
•  Compression context is set per connection
–  New connection starts from scratch with static table and builds new dynamic table
•  An attack vector
–  https://www.imperva.com/docs/Imperva_HII_HTTP2.pdf
•  Can’t turn it off
–  Without it, pipelining would be very difficult
HTTP/2: What no one is telling you
Tools and resources
http://chimera.labs.oreilly.com/books/1230000000545
HTTP/2 and SPDY indicator
•  Chrome:
–  https://chrome.google.com/webstore/detail/http2-and-spdy-
indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en
•  Firefox:
–  https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/
Chrome DevTools
Chrome net-internals
wireshark
Using	the	TLS	key	file:	
	
h$ps://jimshaver.net/2015/02/11/decrypMng-tls-browser-traffic-with-wireshark-the-easy-way/
cURL
https://nghttp2.org/
nghttp
Others
•  h2c (and wiretapping):
–  https://github.com/fstab/h2c
•  h2a: reverse proxy
–  https://github.com/summerwind/h2a
•  Conformance:
–  https://github.com/summerwind/h2spec
•  Charles proxy
–  https://www.charlesproxy.com
•  http-wg
–  https://github.com/http2/http2-spec/wiki/Tools
Summary and takeaways
•  h2 is complicated, but hopefully better for us going forward
–  Browser protocol?
•  Not everything will be as easy/fast as we’d like
•  We still have a lot of learning to do
•  We need to start thinking about how to build applications to best
leverage the new protocol
•  You can help!
Thank you!
1 of 158

Recommended

Reorganizing Website Architecture for HTTP/2 and Beyond by
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondKazuho Oku
46.8K views47 slides
Developing the fastest HTTP/2 server by
Developing the fastest HTTP/2 serverDeveloping the fastest HTTP/2 server
Developing the fastest HTTP/2 serverKazuho Oku
52.3K views56 slides
H2O - the optimized HTTP server by
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP serverKazuho Oku
76.6K views74 slides
HTTP/3 by
HTTP/3HTTP/3
HTTP/3Daniel Stenberg
6K views47 slides
HAProxy 1.9 by
HAProxy 1.9HAProxy 1.9
HAProxy 1.9HAProxy Technologies
934 views39 slides
How happy they became with H2O/mruby and the future of HTTP by
How happy they became with H2O/mruby and the future of HTTPHow happy they became with H2O/mruby and the future of HTTP
How happy they became with H2O/mruby and the future of HTTPIchito Nagata
26.9K views67 slides

More Related Content

What's hot

Writing a fast HTTP parser by
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parserfukamachi
7.3K views51 slides
Airflow at WePay by
Airflow at WePayAirflow at WePay
Airflow at WePayChris Riccomini
6.9K views26 slides
Service workers by
Service workersService workers
Service workersjungkees
3.9K views26 slides
Git and git flow by
Git and git flowGit and git flow
Git and git flowFran García
1.7K views24 slides
Temporal intro and event loop by
Temporal intro and event loopTemporal intro and event loop
Temporal intro and event loopTihomirSurdilovic
193 views18 slides
Airflow presentation by
Airflow presentationAirflow presentation
Airflow presentationAnant Corporation
500 views11 slides

What's hot(20)

Writing a fast HTTP parser by fukamachi
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
fukamachi7.3K views
Service workers by jungkees
Service workersService workers
Service workers
jungkees3.9K views
Understanding and Extending Prometheus AlertManager by Lee Calcote
Understanding and Extending Prometheus AlertManagerUnderstanding and Extending Prometheus AlertManager
Understanding and Extending Prometheus AlertManager
Lee Calcote11.8K views
Learn REST in 18 Slides by Suraj Gupta
Learn REST in 18 SlidesLearn REST in 18 Slides
Learn REST in 18 Slides
Suraj Gupta43.9K views
HTTP/2 Changes Everything by Lori MacVittie
HTTP/2 Changes EverythingHTTP/2 Changes Everything
HTTP/2 Changes Everything
Lori MacVittie15.1K views
Git 101: Git and GitHub for Beginners by HubSpot
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
HubSpot152.8K views
HTTP/2 Introduction by Walter Liu
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
Walter Liu2.2K views
Handle Large Messages In Apache Kafka by Jiangjie Qin
Handle Large Messages In Apache KafkaHandle Large Messages In Apache Kafka
Handle Large Messages In Apache Kafka
Jiangjie Qin46.7K views
How I learned to time travel, or, data pipelining and scheduling with Airflow by PyData
How I learned to time travel, or, data pipelining and scheduling with AirflowHow I learned to time travel, or, data pipelining and scheduling with Airflow
How I learned to time travel, or, data pipelining and scheduling with Airflow
PyData8.7K views
Building a Streaming Microservice Architecture: with Apache Spark Structured ... by Databricks
Building a Streaming Microservice Architecture: with Apache Spark Structured ...Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Building a Streaming Microservice Architecture: with Apache Spark Structured ...
Databricks1.6K views
Why is My Stream Processing Job Slow? with Xavier Leaute by Databricks
Why is My Stream Processing Job Slow? with Xavier LeauteWhy is My Stream Processing Job Slow? with Xavier Leaute
Why is My Stream Processing Job Slow? with Xavier Leaute
Databricks2.3K views
cLoki: Like Loki but for ClickHouse by Altinity Ltd
cLoki: Like Loki but for ClickHousecLoki: Like Loki but for ClickHouse
cLoki: Like Loki but for ClickHouse
Altinity Ltd1.1K views
RESTful services by gouthamrv
RESTful servicesRESTful services
RESTful services
gouthamrv4.5K views

Viewers also liked

Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai) by
Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)
Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)💻 Javier Garza
2.7K views67 slides
Principles of Globally Distributed Systems by
Principles of Globally Distributed SystemsPrinciples of Globally Distributed Systems
Principles of Globally Distributed SystemsFastly
875 views52 slides
Incident Command: The far side of the edge by
Incident Command: The far side of the edgeIncident Command: The far side of the edge
Incident Command: The far side of the edgeFastly
1.1K views36 slides
Building Customer User Experiences from the Edge by
Building Customer User Experiences from the EdgeBuilding Customer User Experiences from the Edge
Building Customer User Experiences from the EdgeFastly
1.9K views14 slides
Solving anything in VCL by
Solving anything in VCLSolving anything in VCL
Solving anything in VCLFastly
13.3K views62 slides
Living room sessions: war stories | Altitude NYC by
Living room sessions: war stories | Altitude NYCLiving room sessions: war stories | Altitude NYC
Living room sessions: war stories | Altitude NYCFastly
400 views37 slides

Viewers also liked(20)

Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai) by 💻 Javier Garza
Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)
Real world experiences with HTTP/2 (Michael Gooding, Javier Garza from Akamai)
💻 Javier Garza2.7K views
Principles of Globally Distributed Systems by Fastly
Principles of Globally Distributed SystemsPrinciples of Globally Distributed Systems
Principles of Globally Distributed Systems
Fastly875 views
Incident Command: The far side of the edge by Fastly
Incident Command: The far side of the edgeIncident Command: The far side of the edge
Incident Command: The far side of the edge
Fastly1.1K views
Building Customer User Experiences from the Edge by Fastly
Building Customer User Experiences from the EdgeBuilding Customer User Experiences from the Edge
Building Customer User Experiences from the Edge
Fastly1.9K views
Solving anything in VCL by Fastly
Solving anything in VCLSolving anything in VCL
Solving anything in VCL
Fastly13.3K views
Living room sessions: war stories | Altitude NYC by Fastly
Living room sessions: war stories | Altitude NYCLiving room sessions: war stories | Altitude NYC
Living room sessions: war stories | Altitude NYC
Fastly400 views
Inside election night at The New York Times | Altitude NYC by Fastly
Inside election night at The New York Times | Altitude NYCInside election night at The New York Times | Altitude NYC
Inside election night at The New York Times | Altitude NYC
Fastly1.5K views
Advanced VCL: how to use restart by Fastly
Advanced VCL: how to use restartAdvanced VCL: how to use restart
Advanced VCL: how to use restart
Fastly3.8K views
Introducing HTTP/2 by Ido Flatow
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
Ido Flatow3.1K views
Why we fight | Altitude NYC by Fastly
Why we fight | Altitude NYCWhy we fight | Altitude NYC
Why we fight | Altitude NYC
Fastly1.1K views
Know your resolvers by Fastly
Know your resolversKnow your resolvers
Know your resolvers
Fastly1K views
Next-gen API authentication by Fastly
Next-gen API authenticationNext-gen API authentication
Next-gen API authentication
Fastly1.2K views
The Case for HTTP/2 by Andy Davies
The Case for HTTP/2The Case for HTTP/2
The Case for HTTP/2
Andy Davies3K views
Addressing IPv6 by Fastly
Addressing IPv6Addressing IPv6
Addressing IPv6
Fastly1.1K views
What's New in HTTP/2 by NGINX, Inc.
What's New in HTTP/2What's New in HTTP/2
What's New in HTTP/2
NGINX, Inc.1.6K views
Http/2 - What's it all about? by Andy Davies
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
Andy Davies4.4K views

Similar to HTTP/2: What no one is telling you

HTTP/2で 速くなるとき ならないとき by
HTTP/2で 速くなるとき ならないときHTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないときKazuho Oku
36K views102 slides
Revisiting HTTP/2 by
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
1.3K views193 slides
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/... by
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Holger Bartel
514 views85 slides
Introduction to HTTP/2 by
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
845 views47 slides
HTTP colon slash slash: the end of the road? by
HTTP colon slash slash: the end of the road?HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?Alessandro Nadalin
5.2K views141 slides
Revisiting HTTP/2 by
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2Fastly
2.5K views140 slides

Similar to HTTP/2: What no one is telling you(20)

HTTP/2で 速くなるとき ならないとき by Kazuho Oku
HTTP/2で 速くなるとき ならないときHTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないとき
Kazuho Oku36K views
Revisiting HTTP/2 by Fastly
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
Fastly1.3K views
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/... by Holger Bartel
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Holger Bartel514 views
Introduction to HTTP/2 by Ido Flatow
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
Ido Flatow845 views
HTTP colon slash slash: the end of the road? by Alessandro Nadalin
HTTP colon slash slash: the end of the road?HTTP colon slash slash: the end of the road?
HTTP colon slash slash: the end of the road?
Alessandro Nadalin5.2K views
Revisiting HTTP/2 by Fastly
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
Fastly2.5K views
From Fast To SPDY by Mike Belshe
From Fast To SPDYFrom Fast To SPDY
From Fast To SPDY
Mike Belshe2.2K views
Improving performance by changing the rules from fast to SPDY by Cotendo
Improving performance by changing the rules   from fast to SPDYImproving performance by changing the rules   from fast to SPDY
Improving performance by changing the rules from fast to SPDY
Cotendo399 views
Introduction to HTTP/2 by Ido Flatow
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
Ido Flatow1.9K views
Introduction to HTTP/2 by Ido Flatow
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
Ido Flatow261 views
HTTP2 and gRPC by Guo Jing
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
Guo Jing14.4K views
Next generation web protocols by Daniel Austin
Next generation web protocolsNext generation web protocols
Next generation web protocols
Daniel Austin1.4K views
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017 by Codemotion
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Codemotion422 views
Enabling Googley microservices with HTTP/2 and gRPC. by Alex Borysov
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.
Alex Borysov18.7K views
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir... by Codemotion
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Codemotion2.7K views

More from Fastly

Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale by
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleAltitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleFastly
460 views15 slides
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet by
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetAltitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetFastly
267 views38 slides
Altitude San Francisco 2018: The World Cup Stream by
Altitude San Francisco 2018: The World Cup StreamAltitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup StreamFastly
259 views7 slides
Altitude San Francisco 2018: We Own Our Destiny by
Altitude San Francisco 2018: We Own Our DestinyAltitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our DestinyFastly
486 views22 slides
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion... by
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Fastly
380 views20 slides
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration by
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationAltitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationFastly
261 views19 slides

More from Fastly(20)

Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale by Fastly
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleAltitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Fastly460 views
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet by Fastly
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetAltitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Fastly267 views
Altitude San Francisco 2018: The World Cup Stream by Fastly
Altitude San Francisco 2018: The World Cup StreamAltitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup Stream
Fastly259 views
Altitude San Francisco 2018: We Own Our Destiny by Fastly
Altitude San Francisco 2018: We Own Our DestinyAltitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our Destiny
Fastly486 views
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion... by Fastly
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Fastly380 views
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration by Fastly
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationAltitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Fastly261 views
Altitude San Francisco 2018: Bringing TLS to GitHub Pages by Fastly
Altitude San Francisco 2018: Bringing TLS to GitHub PagesAltitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
Fastly166 views
Altitude San Francisco 2018: HTTP Invalidation Workshop by Fastly
Altitude San Francisco 2018: HTTP Invalidation WorkshopAltitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation Workshop
Fastly173 views
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe by Fastly
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Fastly316 views
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining... by Fastly
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Fastly197 views
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day by Fastly
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per dayAltitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Fastly115 views
Altitude San Francisco 2018: Authentication at the Edge by Fastly
Altitude San Francisco 2018: Authentication at the EdgeAltitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the Edge
Fastly164 views
Altitude San Francisco 2018: WebAssembly Tools & Applications by Fastly
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & Applications
Fastly106 views
Altitude San Francisco 2018: Testing with Fastly Workshop by Fastly
Altitude San Francisco 2018: Testing with Fastly WorkshopAltitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly Workshop
Fastly181 views
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK by Fastly
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKAltitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Fastly118 views
Altitude San Francisco 2018: WAF Workshop by Fastly
Altitude San Francisco 2018: WAF WorkshopAltitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF Workshop
Fastly285 views
Altitude San Francisco 2018: Logging at the Edge by Fastly
Altitude San Francisco 2018: Logging at the Edge Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge
Fastly170 views
Altitude San Francisco 2018: Video Workshop Docs by Fastly
Altitude San Francisco 2018: Video Workshop DocsAltitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop Docs
Fastly168 views
Altitude San Francisco 2018: Programming the Edge by Fastly
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the Edge
Fastly202 views
Enabling lightning fast content delivery for Spotify by Fastly
Enabling lightning fast content delivery for SpotifyEnabling lightning fast content delivery for Spotify
Enabling lightning fast content delivery for Spotify
Fastly977 views

Recently uploaded

Mobile Core Solutions & Successful Cases.pdf by
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdfIPLOOK Networks
14 views7 slides
Optimizing Communication to Optimize Human Behavior - LCBM by
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBMYaman Kumar
38 views49 slides
"Node.js Development in 2024: trends and tools", Nikita Galkin by
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin Fwdays
33 views38 slides
Cocktail of Environments. How to Mix Test and Development Environments and St... by
Cocktail of Environments. How to Mix Test and Development Environments and St...Cocktail of Environments. How to Mix Test and Development Environments and St...
Cocktail of Environments. How to Mix Test and Development Environments and St...Aleksandr Tarasov
23 views135 slides
Inawisdom IDP by
Inawisdom IDPInawisdom IDP
Inawisdom IDPPhilipBasford
15 views48 slides
"Running students' code in isolation. The hard way", Yurii Holiuk by
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk Fwdays
36 views34 slides

Recently uploaded(20)

Mobile Core Solutions & Successful Cases.pdf by IPLOOK Networks
Mobile Core Solutions & Successful Cases.pdfMobile Core Solutions & Successful Cases.pdf
Mobile Core Solutions & Successful Cases.pdf
IPLOOK Networks14 views
Optimizing Communication to Optimize Human Behavior - LCBM by Yaman Kumar
Optimizing Communication to Optimize Human Behavior - LCBMOptimizing Communication to Optimize Human Behavior - LCBM
Optimizing Communication to Optimize Human Behavior - LCBM
Yaman Kumar38 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 views
Cocktail of Environments. How to Mix Test and Development Environments and St... by Aleksandr Tarasov
Cocktail of Environments. How to Mix Test and Development Environments and St...Cocktail of Environments. How to Mix Test and Development Environments and St...
Cocktail of Environments. How to Mix Test and Development Environments and St...
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays36 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE84 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu437 views
Deep Tech and the Amplified Organisation: Core Concepts by Holonomics
Deep Tech and the Amplified Organisation: Core ConceptsDeep Tech and the Amplified Organisation: Core Concepts
Deep Tech and the Amplified Organisation: Core Concepts
Holonomics17 views
What is Authentication Active Directory_.pptx by HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue199 views
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
AIM102-S_Cognizant_CognizantCognitive by PhilipBasford
AIM102-S_Cognizant_CognizantCognitiveAIM102-S_Cognizant_CognizantCognitive
AIM102-S_Cognizant_CognizantCognitive
PhilipBasford21 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li91 views
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views

HTTP/2: What no one is telling you

  • 2. some people are starting to tell you! Hooman Beheshti VP Technology HTTP/2: What no one’s telling you
  • 3. Everything will be much faster! You don’t need to change anything! Google said so! You can stop doing optimizations!
  • 5. Goals •  Take an objective look at the protocol •  Practical considerations •  Share data •  Better understand the good –  And the bad?
  • 10. A single connection •  single, long-lasting TCP connection •  Theoretically, this means better congestion management between peers •  TLS (with ALPN) •  Connection reuse across domains (same IP and cert)
  • 13. Streams •  Virtual channels for communication –  Translate roughly to a request/response exchange –  Client or server can initiate or terminate •  Stream IDs: –  Client: odd; server: even; 0: reserved –  Each ID has to be larger than the ones before it initiated by the endpoint –  Cannot be reused
  • 15. connection stream stream stream … frame frame frame frame frame frame frame frame frame frame frame frame frame frame frame frame frame frame frame
  • 16. GET /thing HTTP/1.1 Host: www.example.com User-Agent: Some_user_agent HTTP/1.1 200 OK Server: some_server Content-Type: text/html Content-Length: 1000 html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html Request Response
  • 17. GET /thing HTTP/1.1 Host: www.example.com User-Agent: Some_user_agent HTTP/1.1 200 OK Server: some_server Content-Type: text/html Content-Length: 1000 html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html HEADERS Request Response
  • 18. GET /thing HTTP/1.1 Host: www.example.com User-Agent: Some_user_agent HTTP/1.1 200 OK Server: some_server Content-Type: text/html Content-Length: 1000 html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html HEADERS HEADERS Request Response
  • 19. GET /thing HTTP/1.1 Host: www.example.com User-Agent: Some_user_agent HTTP/1.1 200 OK Server: some_server Content-Type: text/html Content-Length: 1000 html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html html DATA DATA DATA DATA DATA DATA HEADERS HEADERS Request Response
  • 20. DATA Carries request or response data HEADERS Carries request/response headers/trailers; can initiate a stream PRIORITY Indicates priority of a stream RST_STREAM Terminates a stream SETTINGS Defines parameters for the connection only PUSH_PROMISE Signals peer for server push PING Maintenance frame for checking RTT, connection, etc GOAWAY For shutting down a connection WINDOW_UPDATE Frame responsible for flow control adjustments CONTINUATION Extends a HEADERS frame and can carry more headers
  • 21. DATA Carries request or response data HEADERS Carries request/response headers/trailers; can initiate a stream PRIORITY Indicates priority of a stream RST_STREAM Terminates a stream SETTINGS Defines parameters for the connection only PUSH_PROMISE Signals peer for server push PING Maintenance frame for checking RTT, connection, etc GOAWAY For shutting down a connection WINDOW_UPDATE Frame responsible for flow control adjustments CONTINUATION Extends a HEADERS frame and can carry more headers
  • 33. Servers •  Apache & Nginx •  h2o –  https://h2o.examp1e.net/ •  https://en.wikipedia.org/wiki/HTTP/2 •  Talk to your CDNs
  • 38. Private WebpageTest 5Mbps/1Mbps; 40ms latency Chrome; h1 vs h2
  • 39. Private WebpageTest 5Mbps/1Mbps; 40ms latency Chrome; h1 vs h2 ~270 runs each!!
  • 51. Firefox; Slow 3G: 780Kbps/330Kbps, 200ms latency
  • 54.       0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms DocComplete h2 h2 h2 h2 h1 h1 h1 h1 Keeping score…
  • 55.       0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms DocComplete h2 h2 h2 h2 h1 h1 h1 h1 DCL Start h1 h1 h2 h1 h1 h1 h2 h1 Speed Index h2/h1 h2 h2 h2 h1 h1 h2 h2 Keeping score…
  • 56. Why?
  • 61. Head of line blocking in TCP
  • 65. Real pages •  8 pages (from 8 real sites) •  16 bandwidth/latency combinations –  Each with 0%, 0.5%, 1%, 2% PLR •  Firefox and Chrome, TLS only, collect all metrics •  300-400 runs with each combination
  • 66. Real pages •  8 pages (from 8 real sites) •  16 bandwidth/latency combinations –  Each with 0%, 0.5%, 1%, 2% PLR •  Firefox and Chrome, TLS only, collect all metrics •  300-400 runs with each combination
  • 68. Analysis •  3 Types of pages, # of resources h1àh2: –  ~75% or higher –  ~half –  ~25% or lower •  2 profiles (0%, 0.5%, 1%, 2% PLR): –  “Broadband”: 5Mbps/1Mbps/40ms –  “Slow 3G”: 780Kbps/330Kbps/200ms •  3 Metrics –  Document Complete –  DOM Content Loaded Start –  Speed Index
  • 69. Site1: Fastly customers page 130-135 requests to onload (~3MB) ~99 requests h1àh2 (2.5MB)
  • 73. Site1; Speed Index; 5Mbps/1Mbps/40ms
  • 76. Site1; Speed Index; 780Kbps/330Kbps/200ms
  • 77. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1 (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
  • 78. Site2 90-100 requests to onload (~1.7MB) ~47 requests h1àh2 (1.2MB)
  • 82. Site2; Speed Index; 5Mbps/1Mbps/40ms
  • 85. Site2; Speed Index; 780Kbps/330Kbps/200ms ***
  • 86. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1 (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2       Site2 DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1 DCL Start h2 h2 h2 h2 h1 h1 h1 h1 Speed Index h1 h2 h1 h2 h1 h2 h1 h2
  • 87. Site3 176-212 requests to onload (~3.5MB) ~45-55 requests h1àh2 (2MB)
  • 91. Site3; Speed Index; 5Mbps/1Mbps/40ms
  • 94. Site3; Speed Index; 780Kbps/330Kbps/200ms
  • 95. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1 (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2       Site2 DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1 DCL Start h2 h2 h2 h2 h1 h1 h1 h1 Speed Index h1 h2 h1 h2 h1 h2 h1 h2       Site3 DocComplete h2 h2 h1 h2 h2 h2 h1 h1 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
  • 96. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1a (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2 Site1b DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1 DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1 Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1 Site1c DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1 DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1 Speed Index h2 h2 h1 h2 h1 h2 h1 h1 Site2a DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1 DCL Start h2 h2 h2 h2 h1 h1 h1 h1 Speed Index h1 h2 h1 h2 h1 h2 h1 h2 Site2b DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1 DCL Start h2 h2 h1 h2 h1 h2 h1 h2 Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1 Site3a DocComplete h2 h2 h1 h2 h2 h2 h1 h1 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1 Site3b DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h1 h2 h1 h1 h1 h2 h1 h1 Site3c DocComplete h1 h2 h2 h2 h1 h2 h2 h2 DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1 Speed Index h1 h2 h2 h2 h2 h2 h2 h2
  • 97. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1a (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2 Site1b DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1 DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1 Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1 Site1c DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1 DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1 Speed Index h2 h2 h1 h2 h1 h2 h1 h1 Site2a DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1 DCL Start h2 h2 h2 h2 h1 h1 h1 h1 Speed Index h1 h2 h1 h2 h1 h2 h1 h2 Site2b DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1 DCL Start h2 h2 h1 h2 h1 h2 h1 h2 Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1 Site3a DocComplete h2 h2 h1 h2 h2 h2 h1 h1 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1 Site3b DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h1 h2 h1 h1 h1 h2 h1 h1 Site3c DocComplete h1 h2 h2 h2 h1 h2 h2 h2 DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1 Speed Index h1 h2 h2 h2 h2 h2 h2 h2
  • 98. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1a (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2 Site1b DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1 DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1 Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1 Site1c DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1 DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1 Speed Index h2 h2 h1 h2 h1 h2 h1 h1 Site2a DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1 DCL Start h2 h2 h2 h2 h1 h1 h1 h1 Speed Index h1 h2 h1 h2 h1 h2 h1 h2 Site2b DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1 DCL Start h2 h2 h1 h2 h1 h2 h1 h2 Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1 Site3a DocComplete h2 h2 h1 h2 h2 h2 h1 h1 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1 Site3b DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h1 h2 h1 h1 h1 h2 h1 h1 Site3c DocComplete h1 h2 h2 h2 h1 h2 h2 h2 DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1 Speed Index h1 h2 h2 h2 h2 h2 h2 h2
  • 99. 0% PLR 2% PLR 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms Site1a (Fastly) DocComplete h2 h2 h2 h1 h1 h1 h1 h1 DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2 Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2 Site1b DocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1 DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1 Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1 Site1c DocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1 DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1 Speed Index h2 h2 h1 h2 h1 h2 h1 h1 Site2a DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1 DCL Start h2 h2 h2 h2 h1 h1 h1 h1 Speed Index h1 h2 h1 h2 h1 h2 h1 h2 Site2b DocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1 DCL Start h2 h2 h1 h2 h1 h2 h1 h2 Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1 Site3a DocComplete h2 h2 h1 h2 h2 h2 h1 h1 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1 Site3b DocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2 DCL Start h2 h2 h2 h2 h2 h2 h2 h2 Speed Index h1 h2 h1 h1 h1 h2 h1 h1 Site3c DocComplete h1 h2 h2 h2 h1 h2 h2 h2 DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1 Speed Index h1 h2 h2 h2 h2 h2 h2 h2
  • 100. Trends? •  Metrics later in the page seem to get affected more by packet loss (?) •  Lots of exceptions –  Sometimes h2 holds up even under loss conditions –  Sometimes h1 wins even when there’s no loss •  Firefox and Chrome don’t always behave the same
  • 101. PLR in the real world
  • 103. Some reading… •  http://c3lab.poliba.it/images/3/3b/QUIC_SAC15.pdf •  https://www.usenix.org/system/files/conference/nsdi14/nsdi14-paper- wang_xiao_sophia.pdf •  http://arxiv.org/pdf/1507.06562v1.pdf •  http://nl.cs.montana.edu/lab/publications/Goel_H2_extended.pdf •  https://99designs.com.au/tech-blog/blog/2016/07/14/real-world- http-2-400gb-of-images-per-day/
  • 105. Caution! •  we’re not going to draw big conclusions, other than: –  Packet loss seems to matter –  h2 isn’t always faster! •  This was all simulated –  PLR is different in the real world –  Users have a mix of connection profiles –  Nothing beats real world data •  Your mileage may (and will) vary
  • 106. Don’t listen to anyone!!
  • 107. Don’t listen to anyone!!
  • 112. QUIC
  • 115. Server push basics •  Ability to “push” a resource to the client before the client requests it –  And before the client knows it needs it –  Only servers can push •  Hop-by-hop
  • 118. connection HEADERS (sid=1) GET /index.html time DATA (sid=2) DATA (sid=1) DATA (sid=2) DATA (sid=2) DATA (sid=2)HEADERS (sid=2) PUSH_PROMISE(sid=1) Promised sid=2 GET /css1.css <request headers> DATA (sid=1) DATA (sid=1) DATA (sid=1)HEADERS (sid=1)
  • 121. Server Push •  What do we push? –  Outside the scope of the protocol •  Push and browser caches don’t necessarily play well together –  RST_STREAM ? –  Even if the browser rejected, it’s too late
  • 122. No push – first view
  • 123. No push – repeat view
  • 124. Push – first view Pushed
  • 125. Push – repeat view Pushed
  • 127. Essential resources for this page •  Similar to <Link rel=“preload”> •  Save 1xRTT
  • 129. Push during server think time •  Push assets to the browser while the server is “thinking” –  Backend processing –  Time to deliver HTML from origin through a CDN
  • 131. Push during server think time •  Push assets to the browser while the server is “thinking” –  Backend processing –  Time to deliver HTML from origin through a CDN •  https://blog.yoav.ws/being_pushy/ •  This isn’t a trivial thing to do; ask your CDN about support
  • 133. We still have some questions •  What do we push? –  Still unclear… –  https://docs.google.com/document/d/ 1K0NykTXBbbbTlv60t5MyJvXjqKGsCVNYHyLEXIxYMv0/ edit •  What if it’s already in the browser cache? –  H2O: CASPER –  Cache Digests: •  https://tools.ietf.org/html/draft-ietf-httpbis-cache-digest-00
  • 135. HPACK
  • 136. HPACK (RFC 7541) •  Addresses the header bloat problem •  Two primary mechanisms –  All headers (name=value) are Huffman encoded –  Indexed tables at each peer
  • 137. Tables •  Static table –  Defined by the RFC, never changes •  Dynamic table –  Built during the connection and maintained by each side –  FIFO
  • 138. +-------+-----------------------------+---------------+ | Index | Header Name | Header Value | +-------+-----------------------------+---------------+ | 1 | :authority | | | 2 | :method | GET | | 3 | :method | POST | | 4 | :path | / | | 5 | :path | /index.html | | 6 | :scheme | http | | 7 | :scheme | https | | 8 | :status | 200 | | 9 | :status | 204 | | 10 | :status | 206 | | 11 | :status | 304 | | 12 | :status | 400 | | 13 | :status | 404 | | 14 | :status | 500 | | 15 | accept-charset | | | 16 | accept-encoding | gzip, deflate | | 17 | accept-language | | | 18 | accept-ranges | | | 19 | accept | | | 20 | access-control-allow-origin | | | 21 | age | | | 22 | allow | | | 23 | authorization | | | 24 | cache-control | | | 25 | content-disposition | | | 26 | content-encoding | | | 27 | content-language | | | 28 | content-length | | | 29 | content-location | | | 30 | content-range | | +-------+-----------------------------+---------------+ Table 1: Static Table Entries +-------+-----------------------------+---------------+ | Index | Header Name | Header Value | +-------+-----------------------------+---------------+ | 31 | content-type | | | 32 | cookie | | | 33 | date | | | 34 | etag | | | 35 | expect | | | 36 | expires | | | 37 | from | | | 38 | host | | | 39 | if-match | | | 40 | if-modified-since | | | 41 | if-none-match | | | 42 | if-range | | | 43 | if-unmodified-since | | | 44 | last-modified | | | 45 | link | | | 46 | location | | | 47 | max-forwards | | | 48 | proxy-authenticate | | | 49 | proxy-authorization | | | 50 | range | | | 51 | referer | | | 52 | refresh | | | 53 | retry-after | | | 54 | server | | | 55 | set-cookie | | | 56 | strict-transport-security | | | 57 | transfer-encoding | | | 58 | user-agent | | | 59 | vary | | | 60 | via | | | 61 | www-authenticate | | +-------+-----------------------------+---------------+ Table 1: Static Table Entries
  • 143. HPACK – things to know •  Default size is 4K –  For the entire dynamic table –  Site-wide headers proposal: •  https://tools.ietf.org/html/draft-nottingham-site-wide-headers-00 •  Compression context is set per connection –  New connection starts from scratch with static table and builds new dynamic table •  An attack vector –  https://www.imperva.com/docs/Imperva_HII_HTTP2.pdf •  Can’t turn it off –  Without it, pipelining would be very difficult
  • 144. content-security-policy: script-src https://connect.facebook.net https://cm.g.doubleclick.net https://ssl.google-analytics.com https://graph.facebook.com https://twitter.com 'unsafe-eval' https://*.twimg.com https://api.twitter.com https://analytics.twitter.com https:// publish.twitter.com https://ton.twitter.com 'unsafe-inline' https://syndication.twitter.com https://www.google.com https://t.tellapart.com https://platform.twitter.com https://www.google- analytics.com 'self'; font-src https://twitter.com https://*.twimg.com data: https:// ton.twitter.com https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com https:// netdna.bootstrapcdn.com 'self'; media-src https://twitter.com https://*.twimg.com https:// ton.twitter.com blob: 'self'; connect-src https://graph.facebook.com https://*.giphy.com https://*.twimg.com https://api.twitter.com https://pay.twitter.com https:// analytics.twitter.com https://media.riffsy.com https://upload.twitter.com https:// api.mapbox.com 'self'; style-src https://fonts.googleapis.com https://twitter.com https:// *.twimg.com https://translate.googleapis.com https://ton.twitter.com 'unsafe-inline' https:// platform.twitter.com https://maxcdn.bootstrapcdn.com https://netdna.bootstrapcdn.com 'self'; object-src https://twitter.com https://pbs.twimg.com; default-src 'self'; frame-src https:// staticxx.facebook.com https://twitter.com https://*.twimg.com https:// 5415703.fls.doubleclick.net https://player.vimeo.com https://pay.twitter.com https:// www.facebook.com https://ton.twitter.com https://syndication.twitter.com https://vine.co twitter: https://www.youtube.com https://platform.twitter.com https://upload.twitter.com https://s-static.ak.facebook.com 'self' https://donate.twitter.com; img-src https:// graph.facebook.com https://*.giphy.com https://twitter.com https://*.twimg.com data: https:// lumiere-a.akamaihd.net https://fbcdn-profile-a.akamaihd.net https://www.facebook.com https:// ton.twitter.com https://*.fbcdn.net https://syndication.twitter.com https://media.riffsy.com https://www.google.com https://stats.g.doubleclick.net https://*.tiles.mapbox.com https:// www.google-analytics.com blob: 'self'; report-uri https://twitter.com/i/csp_report? a=NVQWGYLXFVZXO2LGOQ%3D%3D%3D%3D%3D%3D&ro=false;
  • 145. content-security-policy: script-src https://connect.facebook.net https://cm.g.doubleclick.net https://ssl.google-analytics.com https://graph.facebook.com https://twitter.com 'unsafe-eval' https://*.twimg.com https://api.twitter.com https://analytics.twitter.com https:// publish.twitter.com https://ton.twitter.com 'unsafe-inline' https://syndication.twitter.com https://www.google.com https://t.tellapart.com https://platform.twitter.com https://www.google- analytics.com 'self'; font-src https://twitter.com https://*.twimg.com data: https:// ton.twitter.com https://fonts.gstatic.com https://maxcdn.bootstrapcdn.com https:// netdna.bootstrapcdn.com 'self'; media-src https://twitter.com https://*.twimg.com https:// ton.twitter.com blob: 'self'; connect-src https://graph.facebook.com https://*.giphy.com https://*.twimg.com https://api.twitter.com https://pay.twitter.com https:// analytics.twitter.com https://media.riffsy.com https://upload.twitter.com https:// api.mapbox.com 'self'; style-src https://fonts.googleapis.com https://twitter.com https:// *.twimg.com https://translate.googleapis.com https://ton.twitter.com 'unsafe-inline' https:// platform.twitter.com https://maxcdn.bootstrapcdn.com https://netdna.bootstrapcdn.com 'self'; object-src https://twitter.com https://pbs.twimg.com; default-src 'self'; frame-src https:// staticxx.facebook.com https://twitter.com https://*.twimg.com https:// 5415703.fls.doubleclick.net https://player.vimeo.com https://pay.twitter.com https:// www.facebook.com https://ton.twitter.com https://syndication.twitter.com https://vine.co twitter: https://www.youtube.com https://platform.twitter.com https://upload.twitter.com https://s-static.ak.facebook.com 'self' https://donate.twitter.com; img-src https:// graph.facebook.com https://*.giphy.com https://twitter.com https://*.twimg.com data: https:// lumiere-a.akamaihd.net https://fbcdn-profile-a.akamaihd.net https://www.facebook.com https:// ton.twitter.com https://*.fbcdn.net https://syndication.twitter.com https://media.riffsy.com https://www.google.com https://stats.g.doubleclick.net https://*.tiles.mapbox.com https:// www.google-analytics.com blob: 'self'; report-uri https://twitter.com/i/csp_report? a=NVQWGYLXFVZXO2LGOQ%3D%3D%3D%3D%3D%3D&ro=false; 2.2KB
  • 146. HPACK – things to know •  Default size is 4K –  For the entire dynamic table –  Site-wide headers proposal: •  https://tools.ietf.org/html/draft-nottingham-site-wide-headers-00 •  Compression context is set per connection –  New connection starts from scratch with static table and builds new dynamic table •  An attack vector –  https://www.imperva.com/docs/Imperva_HII_HTTP2.pdf •  Can’t turn it off –  Without it, pipelining would be very difficult
  • 150. HTTP/2 and SPDY indicator •  Chrome: –  https://chrome.google.com/webstore/detail/http2-and-spdy- indicator/mpbpobfflnpcgagjijhmgnchggcjblin?hl=en •  Firefox: –  https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/
  • 154. cURL
  • 156. Others •  h2c (and wiretapping): –  https://github.com/fstab/h2c •  h2a: reverse proxy –  https://github.com/summerwind/h2a •  Conformance: –  https://github.com/summerwind/h2spec •  Charles proxy –  https://www.charlesproxy.com •  http-wg –  https://github.com/http2/http2-spec/wiki/Tools
  • 157. Summary and takeaways •  h2 is complicated, but hopefully better for us going forward –  Browser protocol? •  Not everything will be as easy/fast as we’d like •  We still have a lot of learning to do •  We need to start thinking about how to build applications to best leverage the new protocol •  You can help!