http/2, why upgrading the web? - #devoxxpl flavor

72
WHY HTTP/2? WHY UPGRADING THE WEB? QUENTIN ADAM @ WAXZCE 2013

Upload: quentin-adam

Post on 05-Aug-2015

403 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: HTTP/2, why upgrading the web? - #devoxxPL flavor

WHY HTTP/2?WHY UPGRADING THE WEB?QUENTIN ADAM

@WAXZCE2013

Page 2: HTTP/2, why upgrading the web? - #devoxxPL flavor

Quentin ADAM from the Clever Cloud

@waxzce on twitter – github- soundcloud – instagram ….

WHO AM I ?

Page 3: HTTP/2, why upgrading the web? - #devoxxPL flavor

MY DAY TO DAY WORK : CLEVER CLOUD, MAKE YOUR APP RUN ALL THE TIME

Page 4: HTTP/2, why upgrading the web? - #devoxxPL flavor

And learn a lot of things about your code, apps, and good/bad design…

KEEP YOUR APPS ONLINE. MADE WITH NODE.JS, SCALA, JAVA, RUBY, PHP, PYTHON, GO…

Page 5: HTTP/2, why upgrading the web? - #devoxxPL flavor

AND LEARN A LOT OF THINGS ABOUT YOUR CODE, APPS, AND GOOD/BAD DESIGN…

Page 6: HTTP/2, why upgrading the web? - #devoxxPL flavor

WHAT’S THE HTTP JOB ?

Page 7: HTTP/2, why upgrading the web? - #devoxxPL flavor
Page 8: HTTP/2, why upgrading the web? - #devoxxPL flavor

HTTP1 IS TEXT PROTOCOL

Page 9: HTTP/2, why upgrading the web? - #devoxxPL flavor

REQUEST <-> RESPONSE MODEL

Page 10: HTTP/2, why upgrading the web? - #devoxxPL flavor

THE 4 PARTS

Verb Resource

Headers Body (optional)

Page 11: HTTP/2, why upgrading the web? - #devoxxPL flavor

THE SPEC IS MADE OF OPTIONS AND ABILITY TO EXTENDS

Page 12: HTTP/2, why upgrading the web? - #devoxxPL flavor

FASTER FASTER FASTER

Page 13: HTTP/2, why upgrading the web? - #devoxxPL flavor

// REQUESTS ?

Page 14: HTTP/2, why upgrading the web? - #devoxxPL flavor

HTTP PIPELINING

Page 15: HTTP/2, why upgrading the web? - #devoxxPL flavor

THE HACKS WE ARE DOING EVERYDAY WITHOUT THINKING TO IMPROVE PERFORMANCES

Page 16: HTTP/2, why upgrading the web? - #devoxxPL flavor

MULTIPLE DOMAIN NAMES FOR MULTIPLES STREAMS

Page 17: HTTP/2, why upgrading the web? - #devoxxPL flavor

STATIC ASSETS DOMAIN NAME FOR FAT COOKIES PROBLEM MANAGEMENT

Page 18: HTTP/2, why upgrading the web? - #devoxxPL flavor

COMET/WEBSOCKET/PULLING/SERVER SENT ENVENT… BIDIRECTIONAL DATA STREAMS HACKS

Page 19: HTTP/2, why upgrading the web? - #devoxxPL flavor

SO, WE NEED A NEW VERSION OF HTTP

Page 20: HTTP/2, why upgrading the web? - #devoxxPL flavor

WHO IS IN CHARGE ?

Page 21: HTTP/2, why upgrading the web? - #devoxxPL flavor

HTTPBIS WORKING GROUP

Page 22: HTTP/2, why upgrading the web? - #devoxxPL flavor

FIRST HTTP/2 DRAFT IS SPDY/3 DRAFT

Page 23: HTTP/2, why upgrading the web? - #devoxxPL flavor

BUILD ON SOMETHING

Page 24: HTTP/2, why upgrading the web? - #devoxxPL flavor

SO WHAT IS IN THE BOX ?

Page 25: HTTP/2, why upgrading the web? - #devoxxPL flavor

HTTP/2 IS A BINARY PROTOCOL

Page 26: HTTP/2, why upgrading the web? - #devoxxPL flavor

HHTP/1 + COMPRESSION + SSL = ~BINARY

Page 27: HTTP/2, why upgrading the web? - #devoxxPL flavor

BINARY PROTOCOL ARE SAFER, EASER TO PARSE, CONCISE…

Page 28: HTTP/2, why upgrading the web? - #devoxxPL flavor

WIRESHARK FOR ALL

Page 29: HTTP/2, why upgrading the web? - #devoxxPL flavor

WHAT IS WIRESHARK ?

Your app Wireshark System Network card

Page 30: HTTP/2, why upgrading the web? - #devoxxPL flavor

BUILD ONLY 1 TCP CONNECTION

Page 31: HTTP/2, why upgrading the web? - #devoxxPL flavor

PUT SOME STEAMS IN ONE CONNECTION

Page 32: HTTP/2, why upgrading the web? - #devoxxPL flavor

STREAMS~ 1 HTTP/1 REQUEST = 1 HTTP/2 STREAM

Page 33: HTTP/2, why upgrading the web? - #devoxxPL flavor

STREAMS ARE BUILT OF FRAMES

Page 34: HTTP/2, why upgrading the web? - #devoxxPL flavor

FRAMES

Content a.html #1

Content dog.gif #1

Content a.html #2

Content dog.gif #2

Content a.html #4

Content a.html #3

Content cat.gif #1

Content dog.gif #4 …

Page 35: HTTP/2, why upgrading the web? - #devoxxPL flavor

BINARY GOODNESS => FRAMES IS EASY

Page 36: HTTP/2, why upgrading the web? - #devoxxPL flavor

STREAMS PRIORITY

Page 37: HTTP/2, why upgrading the web? - #devoxxPL flavor

IMPROVE THE BROWSER WATERFALL WITH STREAM PRIORITY

Page 38: HTTP/2, why upgrading the web? - #devoxxPL flavor

PUSH FROM THE SERVER A RESOURCE TO THE CACHE

Page 39: HTTP/2, why upgrading the web? - #devoxxPL flavor

USER XP WILL BE BETTER

Page 40: HTTP/2, why upgrading the web? - #devoxxPL flavor

HEADERS COMPRESSIONS

Page 41: HTTP/2, why upgrading the web? - #devoxxPL flavor

HPACK

*new RFC*

Page 42: HTTP/2, why upgrading the web? - #devoxxPL flavor

HEADERS PERSISTENCE

Page 43: HTTP/2, why upgrading the web? - #devoxxPL flavor

FOCUS ON WEB PERFORMANCES

Page 44: HTTP/2, why upgrading the web? - #devoxxPL flavor

URL CANNOT CHANGE

Page 45: HTTP/2, why upgrading the web? - #devoxxPL flavor

HOW TO UPDATE THE WEB ?

Page 46: HTTP/2, why upgrading the web? - #devoxxPL flavor

HTTP&HTTPS

Page 47: HTTP/2, why upgrading the web? - #devoxxPL flavor

NEGOCIATE A PROTOCOL ELEVATION

Page 48: HTTP/2, why upgrading the web? - #devoxxPL flavor

HTTP/1 BUILD IN METHOD

Upgrade: header

Code 101 Switching

Page 49: HTTP/2, why upgrading the web? - #devoxxPL flavor

WORKFLOW

Page 50: HTTP/2, why upgrading the web? - #devoxxPL flavor

WORKFLOW

Page 51: HTTP/2, why upgrading the web? - #devoxxPL flavor

IT’S STILL SLOW

Page 52: HTTP/2, why upgrading the web? - #devoxxPL flavor

ENCRYPT THE WEB :TLS

Page 53: HTTP/2, why upgrading the web? - #devoxxPL flavor

CURRENT NEGOTIATION: TLS VERSION, CYPHER…

Page 54: HTTP/2, why upgrading the web? - #devoxxPL flavor

NEGOTIATE THE PROTOCOL IN THE SAME TIME OF ENCRYPT NEGOTIATION

Page 55: HTTP/2, why upgrading the web? - #devoxxPL flavor

NPN (CLIENT)

&ALPN (SERVER)

Use this

Page 56: HTTP/2, why upgrading the web? - #devoxxPL flavor

IS IT FOR REAL?

Page 57: HTTP/2, why upgrading the web? - #devoxxPL flavor

LOOKS LIKE IP V6 STORY?

Page 58: HTTP/2, why upgrading the web? - #devoxxPL flavor

MORE SPDY STORY

Page 59: HTTP/2, why upgrading the web? - #devoxxPL flavor

BENCHMARK TIME

CAUTION

Page 60: HTTP/2, why upgrading the web? - #devoxxPL flavor
Page 61: HTTP/2, why upgrading the web? - #devoxxPL flavor

H2O PERFORMANCES

Page 62: HTTP/2, why upgrading the web? - #devoxxPL flavor

H2, H2-14- Firefox

- Chrome

- cURL

- IE (oh yeah)

- …

- Google

- Twitter

- Akamai

- ….

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

Page 63: HTTP/2, why upgrading the web? - #devoxxPL flavor

CLEVER CLOUD POV

Page 64: HTTP/2, why upgrading the web? - #devoxxPL flavor

WORKING ON THIS

Client http2

reverse proxy http2

your app : http1

Page 65: HTTP/2, why upgrading the web? - #devoxxPL flavor

ALL THE GOODNESS OF HTTP2 IN YOUR HTTP1 APP FOR NOTHING :-)

Page 66: HTTP/2, why upgrading the web? - #devoxxPL flavor

WHY IT’S SO COOL?

Page 67: HTTP/2, why upgrading the web? - #devoxxPL flavor

PERFORMANCES

Page 68: HTTP/2, why upgrading the web? - #devoxxPL flavor

REMOVE ALL THE SHITTY HACKS

Page 69: HTTP/2, why upgrading the web? - #devoxxPL flavor

EXPLORE NEW POSSIBILITIES

Page 70: HTTP/2, why upgrading the web? - #devoxxPL flavor

IMPROVE THE USERS XP

Page 71: HTTP/2, why upgrading the web? - #devoxxPL flavor

TODO LIST• https://http2.github.io/

• Specs• Implementations• FAQ• News

• Hack with node/h2o/Jetty

• Install Wireshark on your laptop

Page 72: HTTP/2, why upgrading the web? - #devoxxPL flavor

I’m @waxzce on twitter

I’m the CEO of

A PaaS provider, give it a try ;-)

THX FOR LISTENING & QUESTIONS TIME