http/2: what no one is telling you
TRANSCRIPT
![Page 1: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/1.jpg)
Hooman Beheshti VP Technology
HTTP/2: What no one’s telling you
![Page 2: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/2.jpg)
some people are starting to tell you!
Hooman Beheshti VP Technology
HTTP/2: What no one’s telling you
![Page 3: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/3.jpg)
Everything will be much faster!
You don’t need to change anything!
Google said so!
You can stop doing
optimizations!
![Page 4: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/4.jpg)
2 > 1.1
![Page 5: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/5.jpg)
Goals • Take an objective look at the protocol • Practical considerations • Share data • Better understand the good – And the bad?
![Page 6: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/6.jpg)
HTTP/2 RFC 7540
![Page 7: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/7.jpg)
Binary protocol
![Page 8: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/8.jpg)
Connection
![Page 9: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/9.jpg)
connection
![Page 10: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/10.jpg)
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)
![Page 11: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/11.jpg)
Streams
![Page 12: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/12.jpg)
connection
stream
stream
stream
…
![Page 13: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/13.jpg)
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
![Page 14: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/14.jpg)
Frames
![Page 15: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/15.jpg)
connection
stream
stream
stream
…
frame frame frame frame
frame frame frame frame
frame frame frame
frame frame frame
frame frame
frame frame frame
![Page 16: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/16.jpg)
GET /thing HTTP/1.1Host: www.example.comUser-Agent: Some_user_agent
HTTP/1.1 200 OKServer: some_serverContent-Type: text/htmlContent-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
![Page 17: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/17.jpg)
GET /thing HTTP/1.1Host: www.example.comUser-Agent: Some_user_agent
HTTP/1.1 200 OKServer: some_serverContent-Type: text/htmlContent-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
![Page 18: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/18.jpg)
GET /thing HTTP/1.1Host: www.example.comUser-Agent: Some_user_agent
HTTP/1.1 200 OKServer: some_serverContent-Type: text/htmlContent-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
![Page 19: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/19.jpg)
GET /thing HTTP/1.1Host: www.example.comUser-Agent: Some_user_agent
HTTP/1.1 200 OKServer: some_serverContent-Type: text/htmlContent-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
![Page 20: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/20.jpg)
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
![Page 21: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/21.jpg)
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
![Page 22: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/22.jpg)
Protocol flow
![Page 23: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/23.jpg)
HTTP/1
connection
request response
![Page 24: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/24.jpg)
HTTP/2 connection
(sid=1)DATA
(sid=1)DATA
(sid=1)DATA
(sid=1)HEADERS
(sid=1)HEADERS
![Page 25: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/25.jpg)
HTTP/1
connection
request response
![Page 26: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/26.jpg)
connection
request response
HTTP/1
connection
request response
connection
request response
connection
request response
![Page 27: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/27.jpg)
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
![Page 28: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/28.jpg)
![Page 29: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/29.jpg)
HTTP/1.1
![Page 30: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/30.jpg)
HTTP/1.1 HTTP/2
![Page 31: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/31.jpg)
![Page 32: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/32.jpg)
http://caniuse.com/#search=http2
![Page 33: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/33.jpg)
Servers • Apache & Nginx
• h2o – https://h2o.examp1e.net/
• https://en.wikipedia.org/wiki/HTTP/2
• Talk to your CDNs
![Page 34: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/34.jpg)
Performance
![Page 35: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/35.jpg)
The perfect page
![Page 36: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/36.jpg)
![Page 37: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/37.jpg)
![Page 38: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/38.jpg)
Private WebpageTest
5Mbps/1Mbps; 40ms latency
Chrome; h1 vs h2
![Page 39: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/39.jpg)
Private WebpageTest
5Mbps/1Mbps; 40ms latency
Chrome; h1 vs h2
~270 runs each!!
![Page 40: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/40.jpg)
![Page 41: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/41.jpg)
Packet Loss!
![Page 42: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/42.jpg)
![Page 43: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/43.jpg)
![Page 44: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/44.jpg)
![Page 45: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/45.jpg)
![Page 46: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/46.jpg)
![Page 47: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/47.jpg)
![Page 48: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/48.jpg)
Firefox
![Page 49: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/49.jpg)
![Page 50: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/50.jpg)
Slow 3G: 780Kbps/330Kbps
200ms latency
![Page 51: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/51.jpg)
Firefox; Slow 3G: 780Kbps/330Kbps, 200ms latency
![Page 52: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/52.jpg)
Firefox; 5Mbps/1Mbps, 40ms latency
![Page 53: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/53.jpg)
5Mbps/1Mbps, 40ms latency
![Page 54: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/54.jpg)
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…
![Page 55: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/55.jpg)
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…
![Page 56: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/56.jpg)
Why?
![Page 57: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/57.jpg)
![Page 58: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/58.jpg)
![Page 59: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/59.jpg)
![Page 60: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/60.jpg)
![Page 61: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/61.jpg)
Head of line blocking in TCP
![Page 62: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/62.jpg)
![Page 63: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/63.jpg)
![Page 64: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/64.jpg)
Real pages
![Page 65: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/65.jpg)
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
![Page 66: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/66.jpg)
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
![Page 67: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/67.jpg)
![Page 68: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/68.jpg)
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
![Page 69: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/69.jpg)
Site1: Fastly customers page
130-135 requests to onload (~3MB)
~99 requests h1àh2 (2.5MB)
![Page 70: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/70.jpg)
![Page 71: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/71.jpg)
Site1; DocComplete; 5Mbps/1Mbps/40ms
![Page 72: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/72.jpg)
Site1; DCL; 5Mbps/1Mbps/40ms
![Page 73: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/73.jpg)
Site1; Speed Index; 5Mbps/1Mbps/40ms
![Page 74: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/74.jpg)
Site1; DocComplete; 780Kbps/330Kbps/200ms
![Page 75: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/75.jpg)
Site1; DCL; 780Kbps/330Kbps/200ms ***
![Page 76: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/76.jpg)
Site1; Speed Index; 780Kbps/330Kbps/200ms
![Page 77: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/77.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
![Page 78: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/78.jpg)
Site2
90-100 requests to onload (~1.7MB)
~47 requests h1àh2 (1.2MB)
![Page 79: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/79.jpg)
![Page 80: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/80.jpg)
Site2; DocComplete; 5Mbps/1Mbps/40ms
![Page 81: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/81.jpg)
Site2; DCL; 5Mbps/1Mbps/40ms
![Page 82: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/82.jpg)
Site2; Speed Index; 5Mbps/1Mbps/40ms
![Page 83: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/83.jpg)
Site2; DocComplete; 780Kbps/330Kbps/200ms
![Page 84: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/84.jpg)
Site2; DCL; 780Kbps/330Kbps/200ms
![Page 85: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/85.jpg)
Site2; Speed Index; 780Kbps/330Kbps/200ms ***
![Page 86: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/86.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site2DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1Speed Index h1 h2 h1 h2 h1 h2 h1 h2
![Page 87: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/87.jpg)
Site3
176-212 requests to onload (~3.5MB)
~45-55 requests h1àh2 (2MB)
![Page 88: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/88.jpg)
![Page 89: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/89.jpg)
Site3; DocComplete; 5Mbps/1Mbps/40ms ***
![Page 90: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/90.jpg)
Site3; DCL; 5Mbps/1Mbps/40ms
![Page 91: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/91.jpg)
Site3; Speed Index; 5Mbps/1Mbps/40ms
![Page 92: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/92.jpg)
Site3; DocComplete; 780Kbps/330Kbps/200ms
![Page 93: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/93.jpg)
Site3; DCL; 780Kbps/330Kbps/200ms
![Page 94: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/94.jpg)
Site3; Speed Index; 780Kbps/330Kbps/200ms
![Page 95: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/95.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site2DocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site3DocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
![Page 96: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/96.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1bDocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1cDocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2aDocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2bDocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3aDocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3bDocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3cDocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1Speed Index h1 h2 h2 h2 h2 h2 h2 h2
![Page 97: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/97.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1bDocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1cDocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2aDocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2bDocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3aDocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3bDocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3cDocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1Speed Index h1 h2 h2 h2 h2 h2 h2 h2
![Page 98: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/98.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1bDocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1cDocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2aDocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2bDocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3aDocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3bDocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3cDocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1Speed Index h1 h2 h2 h2 h2 h2 h2 h2
![Page 99: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/99.jpg)
0% PLR 2% PLR5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms 5Mbps/1Mbps; 40ms 780Kbps/330Kbps; 200ms
Site1a(Fastly)
DocComplete h2 h2 h2 h1 h1 h1 h1 h1DCL Start h2 h1 h2 h2 h2/h1 h1 h2 h2
Speed Index h1 h2 h2 h2 h1 h2/h1 h2/h1 h2
Site1bDocComplete h2/h1 h2 h2 h2 h1 h2 h1 h2/h1
DCL Start h1 h2 h1 h1 h1 h2/h1 h1 h1Speed Index h1 h2 h2 h1 h1 h2/h1 h1 h1
Site1cDocComplete h1/h2 h2 h2 h2 h1 h1 h1 h1
DCL Start h1 h1/h2 h1 h1 h1 h2 h1 h1Speed Index h2 h2 h1 h2 h1 h2 h1 h1
Site2aDocComplete h2 h2 h2 h2 h1 h2/h1 h1 h1
DCL Start h2 h2 h2 h2 h1 h1 h1 h1Speed Index h1 h2 h1 h2 h1 h2 h1 h2
Site2bDocComplete h2 h2 h2 h2 h1 h1/h2 h1 h1
DCL Start h2 h2 h1 h2 h1 h2 h1 h2Speed Index h2 h1/h2 h1 h1/h2 h2 h2 h1 h1
Site3aDocComplete h2 h2 h1 h2 h2 h2 h1 h1
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h2 h2 h1 h1 h1/h2 h1/h2 h1 h1
Site3bDocComplete h2 h2 h2 h1/h2 h2 h2/h1 h2 h2
DCL Start h2 h2 h2 h2 h2 h2 h2 h2Speed Index h1 h2 h1 h1 h1 h2 h1 h1
Site3cDocComplete h1 h2 h2 h2 h1 h2 h2 h2
DCL Start h1/h2 h2 h1 h1/h2 h2/h1 h2 h1 h2/h1Speed Index h1 h2 h2 h2 h2 h2 h2 h2
![Page 100: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/100.jpg)
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
![Page 101: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/101.jpg)
PLR in the real world
![Page 102: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/102.jpg)
![Page 103: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/103.jpg)
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/
![Page 104: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/104.jpg)
Now what?
![Page 105: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/105.jpg)
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
![Page 106: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/106.jpg)
Don’t listen to anyone!!
![Page 107: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/107.jpg)
Don’t listen to anyone!!
![Page 108: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/108.jpg)
https://speakerdeck.com/patrickhamann/http2-what-where-why-and-when-smashing-conference-march-2016
![Page 109: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/109.jpg)
https://speakerdeck.com/patrickhamann/http2-what-where-why-and-when-smashing-conference-march-2016
![Page 110: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/110.jpg)
https://github.com/fastlyhoo/wpt_h1vsh2
![Page 111: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/111.jpg)
https://github.com/fastlyhoo/wpt_h1vsh2
![Page 112: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/112.jpg)
QUIC
![Page 113: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/113.jpg)
![Page 114: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/114.jpg)
Server push
![Page 115: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/115.jpg)
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
![Page 116: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/116.jpg)
SETTINGS
![Page 117: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/117.jpg)
PUSH_PROMISE
![Page 118: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/118.jpg)
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=2GET /css1.css
<request headers>
DATA (sid=1) DATA (sid=1) DATA (sid=1)HEADERS (sid=1)
![Page 119: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/119.jpg)
![Page 120: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/120.jpg)
![Page 121: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/121.jpg)
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
![Page 122: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/122.jpg)
No push – first view
![Page 123: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/123.jpg)
No push – repeat view
![Page 124: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/124.jpg)
Push – first view
Pushed
![Page 125: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/125.jpg)
Push – repeat view
Pushed
![Page 126: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/126.jpg)
Use cases
![Page 127: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/127.jpg)
Essential resources for this page • Similar to <Link rel=“preload”>
• Save 1xRTT
![Page 128: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/128.jpg)
Push:
No Push:
![Page 129: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/129.jpg)
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
![Page 130: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/130.jpg)
![Page 131: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/131.jpg)
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
![Page 132: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/132.jpg)
Next navigation?
h$ps://w3c.github.io/resource-hints/
![Page 133: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/133.jpg)
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
![Page 134: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/134.jpg)
Other use cases?
h$ps://www.facebook.com/atscaleevents/videos/1775942979345465/
![Page 135: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/135.jpg)
HPACK
![Page 136: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/136.jpg)
HPACK (RFC 7541) • Addresses the header bloat problem
• Two primary mechanisms – All headers (name=value) are Huffman encoded – Indexed tables at each peer
![Page 137: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/137.jpg)
Tables • Static table – Defined by the RFC, never changes
• Dynamic table – Built during the connection and maintained by each
side – FIFO
![Page 138: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/138.jpg)
+-------+-----------------------------+---------------+ | 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
![Page 139: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/139.jpg)
Performance benefits
![Page 140: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/140.jpg)
Performance benefits
Bytes BrowseràServer
![Page 141: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/141.jpg)
Performance benefits
Bytes BrowseràServer
Bytes BrowseràServer
![Page 142: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/142.jpg)
https://blogs.dropbox.com/tech/2016/05/enabling-http2-for-dropbox-web-services-experiences-and-observations/
![Page 143: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/143.jpg)
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
![Page 144: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/144.jpg)
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;
![Page 145: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/145.jpg)
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
![Page 146: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/146.jpg)
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
![Page 147: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/147.jpg)
![Page 148: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/148.jpg)
Tools and resources
![Page 149: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/149.jpg)
http://chimera.labs.oreilly.com/books/1230000000545
![Page 150: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/150.jpg)
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/
![Page 151: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/151.jpg)
Chrome DevTools
![Page 152: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/152.jpg)
Chrome net-internals
![Page 153: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/153.jpg)
wireshark
UsingtheTLSkeyfile:h$ps://jimshaver.net/2015/02/11/decrypMng-tls-browser-traffic-with-wireshark-the-easy-way/
![Page 154: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/154.jpg)
cURL
![Page 155: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/155.jpg)
https://nghttp2.org/
nghttp
![Page 156: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/156.jpg)
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
![Page 157: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/157.jpg)
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!
![Page 158: HTTP/2: What no one is telling you](https://reader034.vdocuments.pub/reader034/viewer/2022042723/58718d951a28ab2c198b6c6b/html5/thumbnails/158.jpg)
Thank you!