Learn about HTTP/2 and its relationship to HTTP 1.1 and SPDY. Understand core features and how they benefit security and browser efficiency. More that a "what's new" this talk will leave you with an understanding of why choices in HTTP/2 were made. You'll leave knowing what HTTP/2 is and why it is better for clients and servers.
10. Ask Ilya why!
• TCP connections need 3-
way handshake.
• TLS requires up to 2
more round-trips.
• Read High Performance
Browser Networking
http://chimera.labs.oreilly.com/books/1230000000545
11. HTTP nowadays
• Web pages are often >1 MB and >100
requests.
• Http headers can be larger than its data.
• More people on mobile, and latency adds up.
12. introduction
http as we know it
http performance
hello http/2!
firefox
wrapping up
14. Increasing connections
• Requests and responses are ordered on a
connection.
• To render the page quicker, multiple
connections can be used, usually 6.
• some shard sites to get more than that!
• Browsers handle scheduling and priority of
these connections.
16. Content hacks
• Spriting - many images into a sheet, chop
with css.
• Data uris - encode images in the img tag
• Concatenation - bundle javascript or css
into the same file
22. HTTP/2 Delivers
• Avoids head-of-line blocking by framing
multiplexed http over a single connection.
• Identifies request streams allowing
prioritization, flow control and cancelation.
• Reduces impact of headers by compressing
them.
34. flow control
HEADERS
Stream: 3
Flags: END_HEADERS
DATA
Stream: 3
Flags:
WINDOW_UPDATE
Stream: 3
you can send 8k more data Increment: 8192
DATA
Stream: 3
Flags: END_STREAM
HEADERS
Stream: 3
Flags: END_HEADERS
• flow control: send up to the
lesser of stream window and
connection window (stream 0)
43. Challenges
Higher impact of TCP Slow start
Fairness on the network
Server and browser support
debugging a binary protocol
Writing for tomorrow, with today’s TLS
44. introduction
http as we know it
http performance
hello http/2!
firefox
wrapping up
46. Try out http2 with Firefox!
enable http2 in about:config
hit https://h2duo.cloudapp.net/ with Network Tools on
47. Push promise in Firefox
Push promises are sent into a per-session
memory cache.
When the client requests the pushed resources,
they are committed to the disk cache.
Allows a cap and easy discard of unused pushes.
http://bitsup.blogspot.com/2014/12/
firefox-gecko-api-for-http2-push.html
48. introduction
http as we know it
http performance
hello http/2!
firefox
wrapping up
49. Engage!
• Get your web sites running http/2 or spdy!
• Spread the word and get involved in http/2.
• Provide feedback to httpbis!
https://github.com/http2/http2-spec/wiki/Implementations
https://github.com/http2/http2-spec