What HTTP/2.0 will*        TO      __    do for you      Mark Nottingham    http://www.mnot.net/          or, @mnot
*forward-looking statement            ___ statement based on           TECHNICA                    LA projected financialm...
1. Some recent history
IETF HTTPbis WGWHAT? to clarify RFC2616 and improve interopWHO? Roy Fielding, Julian ReschkeWHO (2)? Apache, Mozilla, Chro...
IETF HTTPbis WG (2)STRICTLY chartered to avoid making a newversion of the protocol.Because EVERYBODY knows that’s not goin...
MEANWHILE
November 2009: Mike Belshe and Roberto Peon announce SPDYMarch 2011: Mike talks about SPDY to the HTTPbis WG at IETF80~Apr...
2. What is it?
NO change to HTTP semantics; it’s about how it gets onto the wire
Nothing new to see here
Not magic
1.multiplexing2.header compression3.server push (?)4.TLS (?)
2.1 multiplexing
connection setup                                     vanilla                            serverclient             GE       ...
GE   T   /foo     O   K 200               HTTP/1.0               (with Keep-Alive)GE   T   /ba           r               a...
GE   T   /foo     O   K 200               BUT               it still blocksGE   T   /ba           r               one outs...
GE   T   /fooGE   T   /ba           rGE   T   /ba           z     O   K 200 200     O   K               HTTP/1.1       OK ...
GE   T   /fooGE   T   /ba           r               head-of-line               blocking       OK 200           Still seria...
The State of the Art• Use persistent connections (“keep-alives”)• Pipelining is getting a little deployment• Use multiple ...
What’s so bad about that?• TCP is built for long-lived flows  • More connections = shorter flows  • Congestion control doe...
four at a timecascading waterfalls
GE   T   /fooGE   T   /ba           r          K 2GE   00   T      O       /ba                   SPDY 2 00      O   K     ...
2.2 header compression
GET / HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14(KHTML, li...
GET /assets/dist/js/etsy.recent-searches.20121001205006.js HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; I...
GET /assets/dist/js/jquery.appear.20121001205006.js HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Ma...
GET /assets/dist/js/bootstrap/username-suggester.20121001205006.js HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Maci...
• Four requests• 2,596 bytes total• Minimum three packets in most places • One for the HTML, two+ for assets• 1,797 redund...
HTTP headers on a connection are  highly similar
Request URIUser-AgentCookiesReferer
Big req * many reqs / small IW = SLOW  • Patrick’s test:    • 83 asset requests    • IW = 3    • ~1400 bytes of headers  •...
2.3 server push (?)
2.4 TLS?
3. What does it all mean?
HTTP/2.0 is going tochange Web Engineering...
... but not changeHTTP APIs. Much.
Leaky Abstractions
Reduce Requests
• Image spriting - not necessary• CSS / JS can be in multiple files• HTTP APIs can be finer-grained without  sacrificing p...
Domain Sharding
• Multiplexing SHOULD make multiple  connections unnecessary• Key is to get the TCP connection  “warm” as quickly as possi...
Header Optimisation
• Now, adding new headers is easy • Very small performance / latency /   bandwidth impact• What should be in headers can b...
Predictability
Better Error Handling
Debugging will  need Tools
Lots of tweaking   • Prioritisation   • When to Push   • Flow Control
Transition Decisions• De-sharding• De-combining scripts• De-spriting• etc.
Guess what,Steve?         Absurdly Fast         Web Sites. Fast.
4. What’s still wrong
4.1 Security is hard
4.2 TCP is awkward• In-order delivery = head-of-line blocking• Initial congestion window is small• Packet loss isn’t handl...
HTTP as the“Everything Protocol”          ?
Some Linkshttp://bit.ly/httpbis-homehttp://www.chromium.org/spdyhttp://www.mnot.net/
Upcoming SlideShare
Loading in...5
×

What HTTP/2.0 Will Do For You

39,067

Published on

An overview of where HTTP/2.0 is at and what it might mean for how we deploy and operate the Web, from the chair of the IETF HTTPbis Working Group.

Published in: Technology
0 Comments
60 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
39,067
On Slideshare
0
From Embeds
0
Number of Embeds
62
Actions
Shares
0
Downloads
328
Comments
0
Likes
60
Embeds 0
No embeds

No notes for slide

What HTTP/2.0 Will Do For You

  1. 1. What HTTP/2.0 will* TO __ do for you Mark Nottingham http://www.mnot.net/ or, @mnot
  2. 2. *forward-looking statement ___ statement based on TECHNICA LA projected financialmanagement expectations. A forward-looking statement involves risks withregard to the accuracy of assumptionsunderlying the projections.Discussions of these statements typicallyinclude words such as estimate,anticipate, project, and believe.
  3. 3. 1. Some recent history
  4. 4. IETF HTTPbis WGWHAT? to clarify RFC2616 and improve interopWHO? Roy Fielding, Julian ReschkeWHO (2)? Apache, Mozilla, Chrome, IIS, Varnish,Squid, F5, Curl, ATS, IE, HAProxy...WHEN: Almost finished!WHEN (2): ... after FIVE YEARS :(
  5. 5. IETF HTTPbis WG (2)STRICTLY chartered to avoid making a newversion of the protocol.Because EVERYBODY knows that’s not goingto happen.
  6. 6. MEANWHILE
  7. 7. November 2009: Mike Belshe and Roberto Peon announce SPDYMarch 2011: Mike talks about SPDY to the HTTPbis WG at IETF80~April 2011: Chrome, Google start using SPDYMarch 2012: HTTPbis solicits proposals for new protocol workMarch 2012: Firefox 11 ships with SPDY (off by default)May 2012: Netcraft finds 339 servers that support SPDYJune 2012: Nginx announces SPDY implementationJuly 2012: Akamai announces SPDY implementationTuesday: HTTPbis re-chartered to work on HTTP/2.0, based on SPDY
  8. 8. 2. What is it?
  9. 9. NO change to HTTP semantics; it’s about how it gets onto the wire
  10. 10. Nothing new to see here
  11. 11. Not magic
  12. 12. 1.multiplexing2.header compression3.server push (?)4.TLS (?)
  13. 13. 2.1 multiplexing
  14. 14. connection setup vanilla serverclient GE T /foo HTTP/1.0 One request K 200 O per TCP connection connection close OMG ITS SO SLOW
  15. 15. GE T /foo O K 200 HTTP/1.0 (with Keep-Alive)GE T /ba r able to reuse connections, avoid connection setup O K 200GE T /ba z
  16. 16. GE T /foo O K 200 BUT it still blocksGE T /ba r one outstanding request at a time O K 200GE T /ba z
  17. 17. GE T /fooGE T /ba rGE T /ba z O K 200 200 O K HTTP/1.1 OK 200 (with pipelining) multiple, ordered requests
  18. 18. GE T /fooGE T /ba r head-of-line blocking OK 200 Still serialised! K 2 00 O Large downloads / long “think” time can block other requests
  19. 19. The State of the Art• Use persistent connections (“keep-alives”)• Pipelining is getting a little deployment• Use multiple connections for parallelism • RFC2616 said “2”; HTTPbis says “reasonable” • Browsers use 4-8; bad people use more• Build lots of heuristics into browsers for connection reuse• Hope that it all works out
  20. 20. What’s so bad about that?• TCP is built for long-lived flows • More connections = shorter flows • Congestion control doesn’t have time to ramp up • Makes Buffer Bloat worse• Fairness (user to user, app to app)• How many connections is the best?
  21. 21. four at a timecascading waterfalls
  22. 22. GE T /fooGE T /ba r K 2GE 00 T O /ba SPDY 2 00 O K z multiplexing GE T /a • one connection 20 0O K • many requests • prioritisation GE T /b • out of order OK 20 0 • interleaved GE T /c NO* QUEUING 0 OK 20
  23. 23. 2.2 header compression
  24. 24. GET / HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14(KHTML, like Gecko) Version/6.0.1 Safari/536.26.14Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8DNT: 1Accept-Language: en-usAccept-Encoding: gzip, deflateCookie: uaid=uaid%3DVdhk5W6sexG-_Y7ZBeQFa3cq7yMQ%26_now%3D1325204464%26_slt%3Ds_LCLVpU%26_kid%3D1%26_ver%3D1%26_mac%3DlVnlM3hMdb3Cs3hqMVuk_dQEixsqQzUlNYCs9H_Kj8c.;user_prefs=1&2596706699&q0tPzMlJLaoEAA==Connection: keep-alive 525 bytes
  25. 25. GET /assets/dist/js/etsy.recent-searches.20121001205006.js HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14(KHTML, like Gecko) Version/6.0.1 Safari/536.26.14Accept: */*DNT: 1Referer: http://www.etsy.com/Accept-Language: en-usAccept-Encoding: gzip, deflateCookie: autosuggest_split=1;etala=111461200.1476767743.1349274889.1349274889.1349274889.1.0;etalb=111461200.1.10.1349274889; last_browse_page=%2F; uaid=uaid%3DVdhk5W6sexG-_Y7ZBeQFa3cq7yMQ%26_now%3D1325204464%26_slt%3Ds_LCLVpU%26_kid%3D1%26_ver%3D1%26_mac%3DlVnlM3hMdb3Cs3hqMVuk_dQEixsqQzUlNYCs9H_Kj8c.;user_prefs=1&2596706699&q0tPzMlJLaoEAA==Connection: keep-alive 226 new bytes; 690 total
  26. 26. GET /assets/dist/js/jquery.appear.20121001205006.js HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14(KHTML, like Gecko) Version/6.0.1 Safari/536.26.14Accept: */*DNT: 1Referer: http://www.etsy.com/Accept-Language: en-usAccept-Encoding: gzip, deflateCookie: autosuggest_split=1;etala=111461200.1476767743.1349274889.1349274889.1349274889.1.0;etalb=111461200.1.10.1349274889; last_browse_page=%2F; uaid=uaid%3DVdhk5W6sexG-_Y7ZBeQFa3cq7yMQ%26_now%3D1325204464%26_slt%3Ds_LCLVpU%26_kid%3D1%26_ver%3D1%26_mac%3DlVnlM3hMdb3Cs3hqMVuk_dQEixsqQzUlNYCs9H_Kj8c.;user_prefs=1&2596706699&q0tPzMlJLaoEAA==Connection: keep-alive 14 new bytes; 683 total
  27. 27. GET /assets/dist/js/bootstrap/username-suggester.20121001205006.js HTTP/1.1Host: www.etsy.comUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14(KHTML, like Gecko) Version/6.0.1 Safari/536.26.14Accept: */*DNT: 1Referer: http://www.etsy.com/Accept-Language: en-usAccept-Encoding: gzip, deflateCookie: autosuggest_split=1;etala=111461200.1476767743.1349274889.1349274889.1349274889.1.0;etalb=111461200.1.10.1349274889; last_browse_page=%2F; uaid=uaid%3DVdhk5W6sexG-_Y7ZBeQFa3cq7yMQ%26_now%3D1325204464%26_slt%3Ds_LCLVpU%26_kid%3D1%26_ver%3D1%26_mac%3DlVnlM3hMdb3Cs3hqMVuk_dQEixsqQzUlNYCs9H_Kj8c.;user_prefs=1&2596706699&q0tPzMlJLaoEAA==Connection: keep-alive 28 new bytes; 698 total
  28. 28. • Four requests• 2,596 bytes total• Minimum three packets in most places • One for the HTML, two+ for assets• 1,797 redundant bytes
  29. 29. HTTP headers on a connection are highly similar
  30. 30. Request URIUser-AgentCookiesReferer
  31. 31. Big req * many reqs / small IW = SLOW • Patrick’s test: • 83 asset requests • IW = 3 • ~1400 bytes of headers • Uncompressed: 7-8RT • Compressed (zlib): 1RT
  32. 32. 2.3 server push (?)
  33. 33. 2.4 TLS?
  34. 34. 3. What does it all mean?
  35. 35. HTTP/2.0 is going tochange Web Engineering...
  36. 36. ... but not changeHTTP APIs. Much.
  37. 37. Leaky Abstractions
  38. 38. Reduce Requests
  39. 39. • Image spriting - not necessary• CSS / JS can be in multiple files• HTTP APIs can be finer-grained without sacrificing performance• Third party content is an even bigger problem
  40. 40. Domain Sharding
  41. 41. • Multiplexing SHOULD make multiple connections unnecessary• Key is to get the TCP connection “warm” as quickly as possible, and keep it there
  42. 42. Header Optimisation
  43. 43. • Now, adding new headers is easy • Very small performance / latency / bandwidth impact• What should be in headers can be in headers• Content Negotiation might become interesting again
  44. 44. Predictability
  45. 45. Better Error Handling
  46. 46. Debugging will need Tools
  47. 47. Lots of tweaking • Prioritisation • When to Push • Flow Control
  48. 48. Transition Decisions• De-sharding• De-combining scripts• De-spriting• etc.
  49. 49. Guess what,Steve? Absurdly Fast Web Sites. Fast.
  50. 50. 4. What’s still wrong
  51. 51. 4.1 Security is hard
  52. 52. 4.2 TCP is awkward• In-order delivery = head-of-line blocking• Initial congestion window is small• Packet loss isn’t handled well
  53. 53. HTTP as the“Everything Protocol” ?
  54. 54. Some Linkshttp://bit.ly/httpbis-homehttp://www.chromium.org/spdyhttp://www.mnot.net/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×