SlideShare a Scribd company logo
1 of 62
Download to read offline
Those who stand for nothing,
fall for anything - Alexander
Hamilton
I am always doing that which I
can not do, in order that I may
learn how to do it. - Pablo PicassoPiet van Dongen
HTTP/2:

What's new?
@pietvandongen
About me
Piet van Dongen
- Senior Software Engineer at Luminis
- Multi-privileged
- One foot in the grave
- Buzzword(s) of the month: product thinking
- Should start running again
What's up?
What I do What you do
Introduce the talk Check office mail
Dive into HTTP/2 theory Check Twitter / Facebook / WhatsApp
Look at HTTP/2 in practice Brief moment of attention
Create a HTTP/2 server (live!) Laugh at Piet fumbling
Answer questions Come up with shitty questions
HTTP
in perspective
HTTP in perspective
• A bit of history
• The technology
• Why HTTP/2?
• New features
A bit
of history
1941
• Jorge Luis Borges' El jardín de senderos que se
bifurcan (The Garden of Forking Paths)
• Hypertext fiction
• Vannevar Bush's As We May Think
• Essay on the memex (memory + index)
• Proto hypertext system
• Collective memory
• Information explosion
• Knowledge explosion
1945
Douglas Engelbart
• 1962: Creates NLS (oN-Line System)
• 1968: The Mother of All Demos
Ted Nelson & Andries van Dam
• 1963: Nelson coins hypertext and
hypermedia
• 1967: With Van Dam: Hypertext
Editing System
• 1976: FRESS (File Retrieval and Editing
System)
1962 – 1976
• Aspen Movie Map (funded by (D)ARPA)
• First hypermedia system
1978
• Sir Tim Berners Lee creates ENQUIRE (wiki / web site)
• Peter J. Brown creates Guide (hypertext system)
• Roberto Busa creates Index Thomisticus (text search)
1980
• Ben Shneiderman develops TIES (The Interactive
Encyclopedia System)
• First electronic book: Hypertext Hands-On!
1983
• Apple Computer's HyperCard
• ACM Hypertext Conference
• Storyspace (hypertext fiction software)
1987
• Sir Tim Berners Lee (CERN): WorldWideWeb
• HyperText
• Network
• Browsers
1989
• HTTP V0.9
• TCP-IP connection
• Request: GET address (no http://, host or port)
• Response: byte stream of ASCII characters
• After transfer: connection close
1991
• Browser Lynx
• Birth of the internet
• 500 web servers
1993
• W3C (World Wide Web Consortium) founded
• 10.000 web servers
1994
• HTTP V1.0
• No formal specification
• Required version number in request
• Headers
• Status codes
• New OPTIONS method
1995
• Pre-standard HTTP/1.1
• Fast adoption: Arena, Netscape, Mosaic, Lynx, IE 2.0
• March: 40% of browsers compliant
• June: 65%
1996
• Standard HTTP/1.1 (RFC 2068)
• Required header Host
• Open connections
• Better caching (ETags and headers)
• Lots of additions and improvements
1997
• HTTP/1.1 improvements (RFC 2616)
1999
• HTTPbis Working Group takes 7 years to improve
and clear up HTTP/1.1
2007
• SPDY developed by Google
2012
• A new standard: HTTP/2
2015
The
technology
Terminology
• Hypertext Transfer Protocol
• Hypertext: structured text with
linked (text) nodes
• Protocol: to transfer hypertext from
server to clients
• TCP/IP: Internet Protocol Suite
• HTTP is protocol in top layer
(application)
HTTP
TCPUDP
Application
Transport
IP Internet
Ethernet Link
The protocol from a bird's eye view
• Client / user agent asks (request)
• Methods: GET, PUT, POST, DELETE, HEAD…
• Server answers (response)
• Status codes: 200 OK, 404 Not Found, 500 Internal Server Error…
• Resources identified by URLs
• protocol://host[:port]/path
A request
GET	/	HTTP/1.1	
Host:	www.example.com	
User-Agent:	Mozilla/5.0	(Macintosh;	Intel	Mac	OS	X	10_12_3)	AppleWe
Accept:	*/*
A response
HTTP/1.1	200	OK

Content-Length:	1365

Content-Type:	text/html



<!DOCTYPE	html>

<html	lang="en">

<head><title>Hello	world	demo	page</title></head>

<body>

				<h1>Hello,	world!</h1>

</body>
Why
HTTP/2?
What is wrong with HTTP/1.1?
• Web pages contain more resources than ever
• Efficient loading using 1 request per HTTP connection is hard
• Parallel is possible, but… chance of congestions
• A lot of overhead, especially headers
• Hacks needed: image sprites, data inlining, domain sharding, …
How is HTTP/2 gonna solve that?
• Binary protocol: more efficient parsing, more compact, fewer errors
• Multiplexing:
• Non ordered, interleaved if necessary
• Non blocking, but all data at once
• Just one TCP connection: less congestion, more fair on network
• Header compression with HPACK: more compact and robust
• Server push: pushing data on expected demand
• Compatible with HTTP/1.1
New
features
Binary protocol
• More efficient, easy to parse
• More compact on the wire
• Harder to read for humans
Application (HTTP)
Transport (TCP)
Network (IP)
Link (Ethernet)
Binary Framing
HEADERS frame
DATA frame
Streams, messages, frames
• Stream: bidirectional flow of bytes, contains 1 or more messages
• Message: sequence of frames, map to request of response
• Frame: smalles unit of communication, references stream
Stream 1
HEADERS
Stream 2
HEADERS
Stream 2
DATA
Stream 2
DATA
Multiplexing
• Everything on a single connection
• Messages in random order
• No guessing
• No congestion
Stream 5
DATA
Stream 1
DATA
Stream 3
DATA
Stream 3
DATA
Stream 2
DATA
Stream 3
HEADERS
Stream 1
DATA
Stream 2
DATA
Stream 1
DATA
Server push
• Multiple response for 1 request
• Serve before request
Stream 1
FRAME 2
Stream 4
FRAME 1
…Stream 1
FRAME n
Stream 4
PROMISE
Stream 2
PROMISE
:path: /blog/383
7
38: example.com
:path: /blog
19: text/html
58: Mozilla/5…
Header compression (HPACK)
• Huffman encoding
• ~30% size reduction
• Only diffs on 

subsequent requests
Stream 1
HEADERS
Stream 2
HEADERS
:method GET
:scheme https
:host example.nl
:path /blog
accept text/html
user-agent Mozilla/5…
:method GET
:scheme https
:host example.nl
:path /blog/38
accept text/html
user-agent Mozilla/5…
ALPN
• Application-Layer Protocol Negotiation
• TLS extension of application layer ClientHello (ALPN extenstion + list of protocols)
ServerHello (ALPN extenstion + selected protocol)
ChangeCipherSpec
Finished
ChangeCipherSpec
Finished
And more…
• Inherently safe (because effectively only TLS)
• Stream prioritisation
• Flow control
*
A
12
B
4
*
D
1
C
8
*
D
1
C
8
A
12
B
4
*
D
1
E
8
A
12
B
4
C
8
That's great, Piet.
How about you show us
some working code. You
promised some action.”
“
HTTP /2
in action
HTTP/2 in action
• Implementations in the wild
• Roll your own HTTP/2-server
• HTTP/2 on a bad network
• Findings and recommendations
• Sources
Implementations
in the wild
Terminology
• ALPN: Application-Layer Protocol Negotiation, TLS extension to over
negotiate on application layer protocol
• NPN: precursor to ALPN
• Upgrade: negotiation mechanism for HTTP/1.1 => HTTP/2
• Direct: connection without upgrade / negotiation
• h2: HTTP/2 over TLS
• h2c: HTTP/2 over TCP
Servers
Name Version Negotiation Protocol
Apache HTTP 2.4.17+ ALPN, Upgrade, direct h2, h2c
NGINX 1.9.5+ ALPN, NPN, direct h2, h2c
node-http2 ALPN, NPN, direct h2
Tomcat 8.5+ ALPN, Upgrade, direct h2, h2c
http2 (Go) ALPN, NPN h2, h2-14
Jetty 9.3+ ALPN, Upgrade, direct h2, h2-17, h2-14, h2c,
h2c-17
IIS 10 ? ?
http-katana ALPN, Upgrade h2-12
Clients
Name Version Negotiation Protocol
Firefox 49+ ALPN, NPN h2-15, h2-14, h2
Chrome ALPN h2, h2-14
IE Windows 10 ALPN h2
curl, libcurl ALPN, NPN, Upgrade h2-14, h2c-14
node-http2 ALPN, NPN, direct h2
http-katana ALPN, Upgrade h2-12
http2 (Go) ALPN, NPN h2, h2-14
Roll your
own HTTP/2 server
Requirements
• Java Development Kit (8+)
• Eclipse Vert.x (reactive application toolkit for JVM)
• netty-tcnative-boringssl-static (to dynamicly link TLS-support, no
longer need in Java 9)
• Some HTML, CSS and JavaScript files
• A build / run tool (Gradle in this case)
• A browser (for testing)
Application resources
• HTML: index.html
• JavaScript: application.js (pushed!)
• Style sheet: style.css (pushed!)
• Image: photo.jpg (pushed!)
Demo time!
• Sources can be found at: 

https://github.com/pietvandongen/http2-brain-upgrade

pull requests and issues are welcome!
• The Docker container image is at: 

https://hub.docker.com/r/pietvandongen/http2-demo-server/
HTTP/2
on a bad network
Comparing HTTP/1.1 to HTTP/2
HTTP/2:
Multiplexed + push
HTTP/1.1:
Sequential
HTTP/1.1:
Pipelined
HTTP/2:
Multiplexed
HTTP: high latency
HTTP/2:
Multiplexed + push
HTTP/1.1:
Sequential
HTTP/1.1:
Pipelined
HTTP/2:
Multiplexed
Demonstration
• http://http2.golang.org/gophertiles
Findings
and recommendations
Findings and recommendations
• Switch over, but use ALPN
• Try before you assume (push!)
• Start with a web project
• Don't forget the decrypter during debugging
• Read the documentation :)
Sources
Sources / literature
• https://http2.github.io/: HTTP/2 homepage curated by IETF HTTP
Working Group
• https://developers.google.com/web/fundamentals/performance/
http2/: Introduction to HTTP/2 by Google
• http://vertx.io/: Homepage of Eclipse Vert.x
• Stephen Ludin & Javier Garza, Learning HTTP/2: A Practical Guide for
Beginners (O'Reilly 2017)
• https://hpbn.co/http2/: Chapter 12 of High Performance Browser
Networking (Ilya Grigorik, O'Reilly 2013)
Any
questions?
Any questions?
• Mail me: piet.vandongen@luminis.eu
• Tweet me: https://twitter.com/pietvandongen
• Link me: https://www.linkedin.com/in/pietvandongencom/
• Visit me at Luminis (https://www.luminis.eu/)

More Related Content

What's hot

HTTP/2 : why upgrading the web? - apidays Paris
HTTP/2 : why upgrading the web? - apidays ParisHTTP/2 : why upgrading the web? - apidays Paris
HTTP/2 : why upgrading the web? - apidays ParisQuentin Adam
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 IntroductionWalter Liu
 
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)Balazs Bucsay
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for DevelopersSvetlin Nakov
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016Daniel Stenberg
 
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2Load Impact
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2Ido Flatow
 
Balázs Bucsay - XFLTReaT: Building a Tunnel
Balázs Bucsay - XFLTReaT: Building a TunnelBalázs Bucsay - XFLTReaT: Building a Tunnel
Balázs Bucsay - XFLTReaT: Building a Tunnelhacktivity
 
HTTP/2: What no one is telling you
HTTP/2: What no one is telling youHTTP/2: What no one is telling you
HTTP/2: What no one is telling youFastly
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streamingHung Thai Le
 
Trick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The ThingsTrick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The ThingsBalazs Bucsay
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战Jerry Qu
 
HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and WhyAdrian Cole
 
Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5Alec Muffett
 
XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)
XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)
XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)Balazs Bucsay
 
HTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmHTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmDaniel Stenberg
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesBrent Shaffer
 
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)Balazs Bucsay
 

What's hot (20)

HTTP/2 : why upgrading the web? - apidays Paris
HTTP/2 : why upgrading the web? - apidays ParisHTTP/2 : why upgrading the web? - apidays Paris
HTTP/2 : why upgrading the web? - apidays Paris
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
 
Http2
Http2Http2
Http2
 
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
XFLTReaT: a new dimension in tunnelling (BruCON 0x09 2017)
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016
 
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
O'Reilly Fluent Conference: HTTP/1.1 vs. HTTP/2
 
Introducing HTTP/2
Introducing HTTP/2Introducing HTTP/2
Introducing HTTP/2
 
Balázs Bucsay - XFLTReaT: Building a Tunnel
Balázs Bucsay - XFLTReaT: Building a TunnelBalázs Bucsay - XFLTReaT: Building a Tunnel
Balázs Bucsay - XFLTReaT: Building a Tunnel
 
HTTP/2: What no one is telling you
HTTP/2: What no one is telling youHTTP/2: What no one is telling you
HTTP/2: What no one is telling you
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
Grpc present
Grpc presentGrpc present
Grpc present
 
Trick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The ThingsTrick or XFLTReaT a.k.a. Tunnel All The Things
Trick or XFLTReaT a.k.a. Tunnel All The Things
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战
 
HTTP/2 What's inside and Why
HTTP/2 What's inside and WhyHTTP/2 What's inside and Why
HTTP/2 What's inside and Why
 
Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5
 
XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)
XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)
XFLTReaT: A New Dimension In Tunnelling (DeepSec 2017)
 
HTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks StockholmHTTP/2 - for TCP/IP Geeks Stockholm
HTTP/2 - for TCP/IP Geeks Stockholm
 
HTTP - The Protocol of Our Lives
HTTP - The Protocol of Our LivesHTTP - The Protocol of Our Lives
HTTP - The Protocol of Our Lives
 
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
XFLTReaT: A New Dimension in Tunneling (Shakacon 2017)
 

Similar to HTTP/2: What's new?

HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017Codemotion
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocolsDaniel Austin
 
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICA new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICAPNIC
 
What's New in HTTP/2
What's New in HTTP/2What's New in HTTP/2
What's New in HTTP/2NGINX, Inc.
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebSteffen Gebert
 
A New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHA New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHAPNIC
 
HTTP/2 : why upgrading the web? - DjangoCon Europe 2016 Budapest
HTTP/2 : why upgrading the web? - DjangoCon Europe 2016 BudapestHTTP/2 : why upgrading the web? - DjangoCon Europe 2016 Budapest
HTTP/2 : why upgrading the web? - DjangoCon Europe 2016 BudapestQuentin Adam
 
Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Alex Borysov
 
How to run a bank on Apache CloudStack
How to run a bank on Apache CloudStackHow to run a bank on Apache CloudStack
How to run a bank on Apache CloudStackgjdevos
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)NYversity
 
2. application layer
2. application layer2. application layer
2. application layerTageleBerihun
 
Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layersOlivier Bonaventure
 
Speedup your WordPress mit Nginx und HTTP/2
Speedup your WordPress mit Nginx und HTTP/2Speedup your WordPress mit Nginx und HTTP/2
Speedup your WordPress mit Nginx und HTTP/2wpmeetupka
 
Http2 Security Perspective
Http2 Security PerspectiveHttp2 Security Perspective
Http2 Security PerspectiveSunil Kumar
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICSource Conference
 
Solving HTTP Problems with Code and Protocols
Solving HTTP Problems with Code and ProtocolsSolving HTTP Problems with Code and Protocols
Solving HTTP Problems with Code and ProtocolsC4Media
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Adam Dunkels
 

Similar to HTTP/2: What's new? (20)

HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
HTTP2 in action - Piet Van Dongen - Codemotion Amsterdam 2017
 
Next generation web protocols
Next generation web protocolsNext generation web protocols
Next generation web protocols
 
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUICA new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
A new Internet? Intro to HTTP/2, QUIC, DoH and DNS over QUIC
 
What's New in HTTP/2
What's New in HTTP/2What's New in HTTP/2
What's New in HTTP/2
 
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the WebCleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
 
SPDY Talk
SPDY TalkSPDY Talk
SPDY Talk
 
A New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOHA New Internet? Introduction to HTTP/2, QUIC and DOH
A New Internet? Introduction to HTTP/2, QUIC and DOH
 
HTTP/2 : why upgrading the web? - DjangoCon Europe 2016 Budapest
HTTP/2 : why upgrading the web? - DjangoCon Europe 2016 BudapestHTTP/2 : why upgrading the web? - DjangoCon Europe 2016 Budapest
HTTP/2 : why upgrading the web? - DjangoCon Europe 2016 Budapest
 
Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.Enabling Googley microservices with HTTP/2 and gRPC.
Enabling Googley microservices with HTTP/2 and gRPC.
 
Future Internet protocols
Future Internet protocolsFuture Internet protocols
Future Internet protocols
 
How to run a bank on Apache CloudStack
How to run a bank on Apache CloudStackHow to run a bank on Apache CloudStack
How to run a bank on Apache CloudStack
 
Computer network (10)
Computer network (10)Computer network (10)
Computer network (10)
 
2. application layer
2. application layer2. application layer
2. application layer
 
Innovation is back in the transport and network layers
Innovation is back in the transport and network layersInnovation is back in the transport and network layers
Innovation is back in the transport and network layers
 
Speedup your WordPress mit Nginx und HTTP/2
Speedup your WordPress mit Nginx und HTTP/2Speedup your WordPress mit Nginx und HTTP/2
Speedup your WordPress mit Nginx und HTTP/2
 
Http2 Security Perspective
Http2 Security PerspectiveHttp2 Security Perspective
Http2 Security Perspective
 
I want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUICI want the next generation web here SPDY QUIC
I want the next generation web here SPDY QUIC
 
Shiny New HTTP Shit
Shiny New HTTP ShitShiny New HTTP Shit
Shiny New HTTP Shit
 
Solving HTTP Problems with Code and Protocols
Solving HTTP Problems with Code and ProtocolsSolving HTTP Problems with Code and Protocols
Solving HTTP Problems with Code and Protocols
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
 

Recently uploaded

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 

Recently uploaded (20)

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 

HTTP/2: What's new?

  • 1. Those who stand for nothing, fall for anything - Alexander Hamilton I am always doing that which I can not do, in order that I may learn how to do it. - Pablo PicassoPiet van Dongen HTTP/2:
 What's new?
  • 2. @pietvandongen About me Piet van Dongen - Senior Software Engineer at Luminis - Multi-privileged - One foot in the grave - Buzzword(s) of the month: product thinking - Should start running again
  • 3.
  • 4. What's up? What I do What you do Introduce the talk Check office mail Dive into HTTP/2 theory Check Twitter / Facebook / WhatsApp Look at HTTP/2 in practice Brief moment of attention Create a HTTP/2 server (live!) Laugh at Piet fumbling Answer questions Come up with shitty questions
  • 6. HTTP in perspective • A bit of history • The technology • Why HTTP/2? • New features
  • 8. 1941 • Jorge Luis Borges' El jardín de senderos que se bifurcan (The Garden of Forking Paths) • Hypertext fiction
  • 9. • Vannevar Bush's As We May Think • Essay on the memex (memory + index) • Proto hypertext system • Collective memory • Information explosion • Knowledge explosion 1945
  • 10. Douglas Engelbart • 1962: Creates NLS (oN-Line System) • 1968: The Mother of All Demos Ted Nelson & Andries van Dam • 1963: Nelson coins hypertext and hypermedia • 1967: With Van Dam: Hypertext Editing System • 1976: FRESS (File Retrieval and Editing System) 1962 – 1976
  • 11. • Aspen Movie Map (funded by (D)ARPA) • First hypermedia system 1978
  • 12. • Sir Tim Berners Lee creates ENQUIRE (wiki / web site) • Peter J. Brown creates Guide (hypertext system) • Roberto Busa creates Index Thomisticus (text search) 1980
  • 13. • Ben Shneiderman develops TIES (The Interactive Encyclopedia System) • First electronic book: Hypertext Hands-On! 1983
  • 14. • Apple Computer's HyperCard • ACM Hypertext Conference • Storyspace (hypertext fiction software) 1987
  • 15. • Sir Tim Berners Lee (CERN): WorldWideWeb • HyperText • Network • Browsers 1989
  • 16. • HTTP V0.9 • TCP-IP connection • Request: GET address (no http://, host or port) • Response: byte stream of ASCII characters • After transfer: connection close 1991
  • 17. • Browser Lynx • Birth of the internet • 500 web servers 1993
  • 18. • W3C (World Wide Web Consortium) founded • 10.000 web servers 1994
  • 19. • HTTP V1.0 • No formal specification • Required version number in request • Headers • Status codes • New OPTIONS method 1995
  • 20. • Pre-standard HTTP/1.1 • Fast adoption: Arena, Netscape, Mosaic, Lynx, IE 2.0 • March: 40% of browsers compliant • June: 65% 1996
  • 21. • Standard HTTP/1.1 (RFC 2068) • Required header Host • Open connections • Better caching (ETags and headers) • Lots of additions and improvements 1997
  • 22. • HTTP/1.1 improvements (RFC 2616) 1999
  • 23. • HTTPbis Working Group takes 7 years to improve and clear up HTTP/1.1 2007
  • 24. • SPDY developed by Google 2012
  • 25. • A new standard: HTTP/2 2015
  • 27. Terminology • Hypertext Transfer Protocol • Hypertext: structured text with linked (text) nodes • Protocol: to transfer hypertext from server to clients • TCP/IP: Internet Protocol Suite • HTTP is protocol in top layer (application) HTTP TCPUDP Application Transport IP Internet Ethernet Link
  • 28. The protocol from a bird's eye view • Client / user agent asks (request) • Methods: GET, PUT, POST, DELETE, HEAD… • Server answers (response) • Status codes: 200 OK, 404 Not Found, 500 Internal Server Error… • Resources identified by URLs • protocol://host[:port]/path
  • 32. What is wrong with HTTP/1.1? • Web pages contain more resources than ever • Efficient loading using 1 request per HTTP connection is hard • Parallel is possible, but… chance of congestions • A lot of overhead, especially headers • Hacks needed: image sprites, data inlining, domain sharding, …
  • 33. How is HTTP/2 gonna solve that? • Binary protocol: more efficient parsing, more compact, fewer errors • Multiplexing: • Non ordered, interleaved if necessary • Non blocking, but all data at once • Just one TCP connection: less congestion, more fair on network • Header compression with HPACK: more compact and robust • Server push: pushing data on expected demand • Compatible with HTTP/1.1
  • 35. Binary protocol • More efficient, easy to parse • More compact on the wire • Harder to read for humans Application (HTTP) Transport (TCP) Network (IP) Link (Ethernet) Binary Framing HEADERS frame DATA frame
  • 36. Streams, messages, frames • Stream: bidirectional flow of bytes, contains 1 or more messages • Message: sequence of frames, map to request of response • Frame: smalles unit of communication, references stream Stream 1 HEADERS Stream 2 HEADERS Stream 2 DATA Stream 2 DATA
  • 37. Multiplexing • Everything on a single connection • Messages in random order • No guessing • No congestion Stream 5 DATA Stream 1 DATA Stream 3 DATA Stream 3 DATA Stream 2 DATA Stream 3 HEADERS Stream 1 DATA Stream 2 DATA Stream 1 DATA
  • 38. Server push • Multiple response for 1 request • Serve before request Stream 1 FRAME 2 Stream 4 FRAME 1 …Stream 1 FRAME n Stream 4 PROMISE Stream 2 PROMISE
  • 39. :path: /blog/383 7 38: example.com :path: /blog 19: text/html 58: Mozilla/5… Header compression (HPACK) • Huffman encoding • ~30% size reduction • Only diffs on 
 subsequent requests Stream 1 HEADERS Stream 2 HEADERS :method GET :scheme https :host example.nl :path /blog accept text/html user-agent Mozilla/5… :method GET :scheme https :host example.nl :path /blog/38 accept text/html user-agent Mozilla/5…
  • 40. ALPN • Application-Layer Protocol Negotiation • TLS extension of application layer ClientHello (ALPN extenstion + list of protocols) ServerHello (ALPN extenstion + selected protocol) ChangeCipherSpec Finished ChangeCipherSpec Finished
  • 41. And more… • Inherently safe (because effectively only TLS) • Stream prioritisation • Flow control * A 12 B 4 * D 1 C 8 * D 1 C 8 A 12 B 4 * D 1 E 8 A 12 B 4 C 8
  • 42. That's great, Piet. How about you show us some working code. You promised some action.” “
  • 44. HTTP/2 in action • Implementations in the wild • Roll your own HTTP/2-server • HTTP/2 on a bad network • Findings and recommendations • Sources
  • 46. Terminology • ALPN: Application-Layer Protocol Negotiation, TLS extension to over negotiate on application layer protocol • NPN: precursor to ALPN • Upgrade: negotiation mechanism for HTTP/1.1 => HTTP/2 • Direct: connection without upgrade / negotiation • h2: HTTP/2 over TLS • h2c: HTTP/2 over TCP
  • 47. Servers Name Version Negotiation Protocol Apache HTTP 2.4.17+ ALPN, Upgrade, direct h2, h2c NGINX 1.9.5+ ALPN, NPN, direct h2, h2c node-http2 ALPN, NPN, direct h2 Tomcat 8.5+ ALPN, Upgrade, direct h2, h2c http2 (Go) ALPN, NPN h2, h2-14 Jetty 9.3+ ALPN, Upgrade, direct h2, h2-17, h2-14, h2c, h2c-17 IIS 10 ? ? http-katana ALPN, Upgrade h2-12
  • 48. Clients Name Version Negotiation Protocol Firefox 49+ ALPN, NPN h2-15, h2-14, h2 Chrome ALPN h2, h2-14 IE Windows 10 ALPN h2 curl, libcurl ALPN, NPN, Upgrade h2-14, h2c-14 node-http2 ALPN, NPN, direct h2 http-katana ALPN, Upgrade h2-12 http2 (Go) ALPN, NPN h2, h2-14
  • 50. Requirements • Java Development Kit (8+) • Eclipse Vert.x (reactive application toolkit for JVM) • netty-tcnative-boringssl-static (to dynamicly link TLS-support, no longer need in Java 9) • Some HTML, CSS and JavaScript files • A build / run tool (Gradle in this case) • A browser (for testing)
  • 51. Application resources • HTML: index.html • JavaScript: application.js (pushed!) • Style sheet: style.css (pushed!) • Image: photo.jpg (pushed!)
  • 52. Demo time! • Sources can be found at: 
 https://github.com/pietvandongen/http2-brain-upgrade
 pull requests and issues are welcome! • The Docker container image is at: 
 https://hub.docker.com/r/pietvandongen/http2-demo-server/
  • 53. HTTP/2 on a bad network
  • 54. Comparing HTTP/1.1 to HTTP/2 HTTP/2: Multiplexed + push HTTP/1.1: Sequential HTTP/1.1: Pipelined HTTP/2: Multiplexed
  • 55. HTTP: high latency HTTP/2: Multiplexed + push HTTP/1.1: Sequential HTTP/1.1: Pipelined HTTP/2: Multiplexed
  • 58. Findings and recommendations • Switch over, but use ALPN • Try before you assume (push!) • Start with a web project • Don't forget the decrypter during debugging • Read the documentation :)
  • 60. Sources / literature • https://http2.github.io/: HTTP/2 homepage curated by IETF HTTP Working Group • https://developers.google.com/web/fundamentals/performance/ http2/: Introduction to HTTP/2 by Google • http://vertx.io/: Homepage of Eclipse Vert.x • Stephen Ludin & Javier Garza, Learning HTTP/2: A Practical Guide for Beginners (O'Reilly 2017) • https://hpbn.co/http2/: Chapter 12 of High Performance Browser Networking (Ilya Grigorik, O'Reilly 2013)
  • 62. Any questions? • Mail me: piet.vandongen@luminis.eu • Tweet me: https://twitter.com/pietvandongen • Link me: https://www.linkedin.com/in/pietvandongencom/ • Visit me at Luminis (https://www.luminis.eu/)