http/2 - for tcp/ip geeks stockholm

Post on 17-Jul-2015

21.872 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Daniel Stenberg, May 6th 2015

Daniel Stenberg, May 6th 2015

HTTP Today

HTTP/2 basics

Status

Future

Q&A

Daniel Stenberg, May 6th 2015

Daniel Stenberg

Email: daniel@haxx.seTwitter: @bagderWeb: daniel.haxx.seBlog: daniel.haxx.se/blog

network hacker at

Daniel Stenberg, May 6th 2015

Please ask!

… just maybe everything isn't crystal clear at once.

Daniel Stenberg, May 6th 2015

Internet Today

HTTP for everythingThe web has changed significantly since 1996

Daniel Stenberg, May 6th 2015

Request and payload growth

in 4 years...

7777

100100

725K725K

1900K1900K

http

arch

ive.

org

Daniel Stenberg, May 6th 2015

Roundtrip Bonanza

Daniel Stenberg, May 6th 2015

connections per page

38ht

tpar

chiv

e.or

g

Daniel Stenberg, May 6th 2015

Latency adds up

4,000 ms

750 ms

Page load time

Round trip time0 ms 240 ms

Mik

e Be

lshe

Daniel Stenberg, May 6th 2015

Head of line blocking

Daniel Stenberg, May 6th 2015

HTTP 1.1 workarounds

Daniel Stenberg, May 6th 2015

SpritingSpriting

Daniel Stenberg, May 6th 2015

Inlining

.icon1 { background: url(data:image/png;base64,<data>) no-repeat;}

.icon2 { background: url(data:image/png;base64,<data>) no-repeat;}

Daniel Stenberg, May 6th 2015

Concatenation

$ cat *.js > single-monster.js

Daniel Stenberg, May 6th 2015

Sharding

Daniel Stenberg, May 6th 2015

Quirky

Annoying for developersAdds layers of toolsHampers cachingDownloads too much

Daniel Stenberg, May 6th 2015

Daniel Stenberg, May 6th 2015

HTTP/2

Daniel Stenberg, May 6th 2015

“Just a new framing layer”

maintains HTTP paradigmshttp:// and https:// URLs cannot be changedHTTP/1.1 servers and clients will be around for decadesProxies must be able to convert 1:1Less optional partsNo more minor version!

Daniel Stenberg, May 6th 2015

Binary

•No more telnet tricks•Easier framing•TLS and compression anyway...•Wireshark inspector•A handful set frame types, like HEADERS and DATA

Daniel Stenberg, May 6th 2015

Multiplexed (1/2)

•Multiple streams over a single physical connection•Max number of parallel streams set by peer

Daniel Stenberg, May 6th 2015

Multiplexed (2/2)

Daniel Stenberg, May 6th 2015

Better utilization of bandwidth

Daniel Stenberg, May 6th 2015

Header compression

•HTTP headers are big and are growing•HTTP 1 had no header compression•TCP slow start and initial window size•Headers are notoriously repetitive•Cookies•HPACK•Not a CRIME victim•Padding

Daniel Stenberg, May 6th 2015

Streams

Dynamic priority

Flow controlAA

BB CC

Dependencies

Daniel Stenberg, May 6th 2015

Server push

Give me HTML please!

Here's HTML for you

Here's CSS for you

Daniel Stenberg, May 6th 2015

Stricter TLS

TLS version 1.2+ only

Stricter cipher suite requirements

No renegotiations

Daniel Stenberg, May 6th 2015

HTTP/2 is not

Mandatory TLSChanging HTTP headers

Daniel Stenberg, May 6th 2015

How will HTTP/2 affect users?

Faster page loadsMore responsive loadingMore HTTPS

Daniel Stenberg, May 6th 2015

How will HTTP/2 affect web development?

HTTP/1 work-arounds hurt HTTP/2 perf

Need to do separate tweaks

Optimal HTTP/2 usage will need some time

Daniel Stenberg, May 6th 2015

ImplementationsNghttp2Http2-katanaNode-http2FirefoxHttp2-perlIij-http2AkamaiChromeOpenLiteSpeed

TwitterWiresharkEricsson MSPHttp2 (Go)Http2-goOkHttpTrusterdHaskell http libSteelApp ADC

Google GFEDeuteriumHyperUndertowF5SasazkaLucidH2OWarp

curlCl-http2NettyJettyMicrosoftHttp-2Protocol::HTTP2mod_h2Nginxwget

https://github.com/http2/http2-spec/wiki/Implementations

Daniel Stenberg, May 6th 2015

Will HTTP/2 get widely deployed?

“Look at IPv6”SPDY proved fast growth can happenMajor browsers are on the trainMany sites already did SPDY - likely to go HTTP/2

Daniel Stenberg, May 6th 2015

Schedule

Firefox 35 – enabled by default January 13th

Chrome 40 – enabled by default January 21st

IESG approved on February 18th

HTTP/2 final RFC in Q2 2015 ?

Daniel Stenberg, May 6th 2015

HTTP/2 – May 6th 2015

All browser support seen so far only over HTTPS

Firefox: HTTP/2 in 10% of all HTTP responses1

HTTP/2 is used 10 times more than HTTP/1.0

Google: HTTP/2 used in 18% of global traffic2

HTTP/2 is supported by 44% of browsers in use right now

IPv6: 6.6% today, almost 20 years after first RFC3

1. Rough and not statistically sound numbers from Mozilla Telemetry data for Firefox 36.2. Rough and rapidly changing numbers in an evolving climate. Graciously provided by Google.3. https://www.google.com/intl/en/ipv6/statistics.html

Daniel Stenberg, May 6th 2015

Browser support

http://caniuse.com/#feat=http2

Daniel Stenberg, May 6th 2015

My tealeaves tell me...

http://daniel.haxx.se/blog/2015/03/31/the-state-and-rate-of-http2-adoption/

10% at end of 2015

Daniel Stenberg, May 6th 2015

Future

HTTP/2 lays the foundation for the future

Time to drop legacy HTTP “mistakes”?

HTTP/3 can happen faster

QUIC

The HTTP Workshop (Münster, 27-30 July 2015)

https://httpworkshop.github.io/

Daniel Stenberg, May 6th 2015

Final recap

Binary and multiplexedPrimarily over TLSUsers won't see a 2 anywhereIt's already here

Daniel Stenberg, May 6th 2015

Thank you!

See also http2 explained http://daniel.haxx.se/http2

Daniel Stenberg, May 6th 2015

Doing good is part of our code

Daniel Stenberg, May 6th 2015

Credits

✗ HTTP and TCP trend numbers from http://httparchive.org

✗ RTT / page load data from Mike Belshe✗ HTTP/2 usage numbers by Google and Firefox Telemetry

✗ Lego pieces borrowed from my kids

Daniel Stenberg, May 6th 2015

License

This presentation and its contents are licensed under the Creative Commons Attribution 4.0 license: http://creativecommons.org/licenses/by/4.0/

top related