http/2 : why upgrading the web? - djangocon europe 2016 budapest

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

Upload: quentin-adam

Post on 07-Jan-2017

1.234 views

Category:

Software


1 download

TRANSCRIPT

X fact to scale out

Why http/2?Why upgrading the web?Quentin ADAM @waxzce2013

Quentin ADAM from the Clever Cloud@waxzce on twitter github- soundcloud instagram .Who am I ?

My day to day work : Clever Cloud, make your app run all the time

And learn a lot of things about your code, apps, and good/bad designKeep your apps online. made with node.js, scala, java, ruby, php, python, go

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

Give back to the community

NEVER GONNA LET YOU DOWNclever-cloud.com

Whats the http job ?

HypertextTransfertProtocol

HTTP1 is text protocol

Request response model

The 4 parts

The spec is made of options and ability to extends

What was the requirements?

Faster faster faster

// requests ?

http pipelining

The hacks we are doing everyday without thinking to improve performances

Multiple domain names for multiples streams

Static assets domain name for Fat cookies problem management

Comet/Websocket/pulling/server sent envent Bidirectional data streams hacks

So, we need a new version of http

Who is in charge ?

Httpbis working group

First http/2 draft is spdy/3 draft

Build on something

So what is in the box ?

HTTP/2 is a binary protocol

HTtp/1 + Compression + SSL = ~binary

Binary protocol are safer, easer to parse, concise

Wireshark for all

What is wireshark ?

Build only 1 tcp connection

Put some steams in one connection

Streams~ 1 http/1 request = 1 http/2 stream

Streams are built of frames

frames

Binary goodness => frames is easy

No more blocking i/o from DH/storage to network, use it most efficient as possibleSend data when ready to send

39

Streams priority

Improve the browser waterfall with stream priority

Push from the server a resource to the cache

User xp will be better

Headers

Header compression

HPACK

*new RFC*

Headers persistence

Focus on web performances

No change4 parts request visionName of headersName of verbsName of protocol= terminology

How to update the web ?

url cannot change

http&https

Negociate a protocol elevation

HTTP/1 build in method

workflow

workflow

2 connections Its still slow

Encrypt the web :TLS

Current negotiation: TLS version, cypher

Negotiate the protocol in the same time of encrypt negotiation

NPN (client)&ALPN (server)

Use this

istlsfastyet.com

Is it for real?

Looks like ip v6 story?

More Spdy story

Benchmark timeCaution

H2O performances

source

H2, h2-14Firefox Chrome cURLIE (oh yeah)

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

Clever Cloud management for the masses

Working on this

Some of the goodness of http/2 directly on http/1 apps

Lot of work putting this on actual web framework

Django is not ready (yet)and this is a good committer slot opportunity

Problem 1: WSGI ;-)

But python is on the field with hyper

1.0.0 released on October 2015

Why its so cool?

performances

Remove all the shitty hacks

Explore new possibilities

Improve the users XP

Todo listhttps://http2.github.io/SpecsImplementationsFAQNews

Hack with http://python-hyper.org/ Follow the Cory Benfield work @Lukasaoz

Install Wireshark on your laptop

Im @waxzce on twitter

I like feedbacks on my talks, good or bad.

I also need feedbacks as python users on Clever Cloud, so please give it a try

Thx for listening & questions timeclever-cloud.com gift coupon code:[email protected] have plenty of stickers ;-)