SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
https://www.flickr.com/photos/expressmonorail/3910036864 
HTTP/2 - What’s it all about? 
@AndyDavies 
#RevolutionConf, Sept 2014
https://www.flickr.com/photos/benjreay/14713228051 
Heard of HTTP/2 or SPDY?
What’s our greatest enemy? 
https://www.flickr.com/photos/54459164@N00/5218183788
The browser that just won’t die?
The explosion in device diversity? 
http://opensignal.com/reports/2014/android-fragmentation/
… or maybe latency is our greatest enemy 
https://www.flickr.com/photos/jjvaca/728072059
Backbone Round Trip Times from London 
http://www.vectortemplates.com 
BT: http://ippm.bt.net/hour/europe/lo.shtml
Backbone Round Trip Times from London 
http://www.vectortemplates.com 
81ms 
BT: http://ippm.bt.net/hour/europe/lo.shtml 
201ms 
156ms 
266ms 
232ms 
28ms
There’s the last mile latency too 
(and routers, other networking kit, mobile latencies too) 
https://www.flickr.com/photos/kiwanja/3170292282
(TCP Segments) 
TCP and the Lower Bound of Web Performance! 
John Rauser 
Will probably need more than one round-trip 
285kB 
214kB 
143kB 
71kB 
1 2 3 4 5 6 7 8 9 10 11 
Round Trips 
Size 
initcwnd = 3! 
many sites use 10
Higher latency = slower load times 
Page Load Time (s) 
4 
3 
2 
1 
0 20 40 60 80 100 120 140 160 180 200 220 240 
Round Trip Time (ms) 
Mike Belshe - “More Bandwidth Doesn’t Matter (much)”
Headers are sent with every request 
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/ 
webp,*/*;q=0.8 
Accept-Encoding:gzip,deflate,sdch 
Accept-Language:en-US,en;q=0.8 
Cache-Control:no-cache 
Cookie:NTABS=B5; BBC-UID= 
75620c7ca040deb7c0d3275d81c51c2361684a959e281319b3b5da4dab5958880Mozi 
lla%2f5%2e0%20%28Macintosh%3b%20Intel%20Mac%20OS%20X 
%2010%5f9%5f1%29%20AppleWebKit%2f537%2e36%20%28KHTML%2c%20like%20Gecko 
%29%20Chrome%2f31%2e0%2e1650%2e63%20Safari%2f537%2e36; ckns_policy=111; 
BGUID=55b28cbc20d2e32f221f3ed0e1be9624c960f93b1e483329c3752a6d253efd40; 
s1=52CC023F3812005F; BBCCOMMENTSMODULESESSID=L-k22bbkde3jkqf928himljnlkl3; 
ckpf_ww_mobile_js=on; ckpf_mandolin= 
%22footer-promo%22%3A%7B%22segment%22%3Anull%2C%22end%22%3A 
%221392834182609%22%7D; _chartbeat2=ol0j0uq4hkq6pumu. 
1389101635322.1392285654268.0111111111111111; _chartbeat_uuniq=1; 
ecos.dt=1392285758216 
Host:www.bbc.co.uk 
Pragma:no-cache 
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/ 
537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
Headers are sent with every request 
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/ 
webp,*/*;q=0.8 
Accept-Encoding:gzip,deflate,sdch 
Accept-Language:en-US,en;q=0.8 
Cache-Control:no-cache 
Cookie:NTABS=B5; BBC-UID= 
And they contain lots 
75620c7ca040deb7c0d3275d81c51c2361684a959e281319b3b5da4dab5958880Mozi 
of repeated data 
lla%2f5%2e0%20%28Macintosh%3b%20Intel%20Mac%20OS%20X 
%2010%5f9%5f1%29%20AppleWebKit%2f537%2e36%20%28KHTML%2c%20like%20Gecko 
%29%20Chrome%2f31%2e0%2e1650%2e63%20Safari%2f537%2e36; ckns_policy=111; 
BGUID=55b28cbc20d2e32f221f3ed0e1be9624c960f93b1e483329c3752a6d253efd40; 
s1=52CC023F3812005F; BBCCOMMENTSMODULESESSID=L-k22bbkde3jkqf928himljnlkl3; 
ckpf_ww_mobile_js=on; ckpf_mandolin= 
%22footer-promo%22%3A%7B%22segment%22%3Anull%2C%22end%22%3A 
%221392834182609%22%7D; _chartbeat2=ol0j0uq4hkq6pumu. 
1389101635322.1392285654268.0111111111111111; _chartbeat_uuniq=1; 
ecos.dt=1392285758216 
Host:www.bbc.co.uk 
Pragma:no-cache 
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/ 
537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
HTTP could use TCP more efficiently 
http://www.flickr.com/photos/7671591@N08/1469828976
We’ve been hacking around the gaps 
https://www.flickr.com/photos/rocketnumber9/13695281
Browsers support more parallel connections 
Old browsers - 2 parallel connections 
Today’s browsers - 4 plus connections
We split resources across domains 
www.bbc.co.uk! 
static.bbci.co.uk! 
news.bbcimg.co.uk! 
node1.bbcimg.co.uk
We follow recipes e.g. Reduce Requests 
http://www.flickr.com/photos/mrsmagic/2247364228
DataURIs 
url(data:image/ 
png;base64,iVBORw0KGgoAA 
AANSUhEUgAAABkAAAAZCAMAA 
ADzN3VRAAAAGXRFWHRTb2Z0d 
2FyZQBBZG9iZSBJbWFnZVJlY 
WR5ccllPAAAAAZQTFRF/ 
wAAAAAAQaMSAwAAABJJREFUe 
NpiYBgFo2AwAIAAAwACigABt 
nCV2AAAAABJRU5ErkJggg==) 
=
DataURIs 
Larger downloads (needs gzip)! 
Overrides browser priorities 
url(data:image/ 
png;base64,iVBORw0KGgoAA 
AANSUhEUgAAABkAAAAZCAMAA 
ADzN3VRAAAAGXRFWHRTb2Z0d 
2FyZQBBZG9iZSBJbWFnZVJlY 
WR5ccllPAAAAAZQTFRF/ 
wAAAAAAQaMSAwAAABJJREFUe 
NpiYBgFo2AwAIAAAwACigABt 
nCV2AAAAABJRU5ErkJggg==) 
=
Create CSS and JavaScript bundles 
+ + + + 
= =
Create CSS and JavaScript bundles 
+ + + + 
= = More to download 
and parse
Create CSS and JavaScript bundles 
+ + + + 
= = More to download 
and parse +! x 
! 
Whole bundle is 
invalidated if a 
single file changes
CSS Sprites
CSS Sprites 
To get just one sprite …
CSS Sprites 
To get just one sprite … 
Browser must download and 
decode the whole image
There’s a tension between development and delivery 
https://www.flickr.com/photos/domiriel/7376397968
Build tools and optimisation services help plug gaps 
and won’t be going away…
But couldn’t we be more efficient? 
https://www.flickr.com/photos/belsymington/4102783610
HTTP/2 
(Evolved from Google’s SPDY)
Single multiplexed connection to host 
HTTP/2 
HTTP/1.1
Multiplexing offers interesting possibilities
How much of an image do we need to make it usable - 5%? 
Experiment by John Mellor at Google
How much of an image do we need to make it usable - 15%?
How much of an image do we need to make it usable - 25%?
How much of an image do we need to make it usable - 80%?
How much of an image do we need to make it usable - 80%? 
There are some questions over the user 
experience with progressive images
HTTP/1.1 - browser sets priorities
HTTP/2 - browser hints priorities 
server can override them
Adds header compression too
Google and Mozilla will only support over HTTPS 
http://www.flickr.com/photos/forsytht/4553656244
Browsers pull resources from the server but … 
https://www.flickr.com/photos/steveweaver/2915792034
What if the server could push them? 
https://www.flickr.com/photos/christian_bachellier/582457911
Loading a web page 
Browser Server 
Server 
builds 
page 
GET index.html 
<html><head>… 
Request other page resources
Loading a web page 
Browser Server 
Server 
builds 
page 
GET index.html 
<html><head>… 
Network 
Idle 
Request other page resources
Browser Server 
Server 
builds 
page 
GET index.html 
Push critical resource e.g. CSS 
<html><head>… 
Server Push 
Request other page resources
Browser Server 
Server 
builds 
page 
GET index.html 
Push critical resource e.g. CSS 
<html><head>… 
Request other page resources 
Server Push
Browser Server 
Server 
builds 
page 
GET index.html 
Push critical resource e.g. CSS 
<html><head>… 
Request other page resources 
Server Push 
Browser can reject push
Other opportunities for server push? 
HTML 
CSS 
DOM 
CSSOM 
Render! 
Tree 
JavaScript Layout Paint
Other opportunities for server push? 
HTML 
CSS 
DOM 
CSSOM 
Render! 
Tree 
Fonts and background 
images discovered 
when render tree 
builds 
JavaScript Layout Paint
Other opportunities for server push? 
HTML 
CSS 
DOM 
CSSOM 
Render! 
Tree 
Fonts and background 
images discovered 
when render tree 
builds 
JavaScript Layout Paint 
Could we push them?
http://www.flickr.com/photos/atoach/6014917153
Challenges 
We need to get better at HTTPS! 
Bulletproof SSL and TLS, Ivan Rustic! 
https://www.ssllabs.com/ssltest/! 
https://istlsfastyet.com/! 
! 
Need support in mainstream servers! 
! 
Differing optimisations for HTTP/1.1 and HTTP/2 
(and indeed other contexts e.g. mobile)
HTTP/2 is coming! 
It uses the network more efficiently! 
Enables server to push resources! 
! 
It will change the way build and deliver sites! 
! 
Go Play!
http://http2.github.io/
http://www.flickr.com/photos/auntiep/5024494612 
! 
@andydavies! 
! 
andy.davies@nccgroup.com ! 
! 
http://slideshare.net/andydavies!
Http/2  - What's it all about?

Contenu connexe

Tendances

Tendances (20)

Http2
Http2Http2
Http2
 
HTTP/2 Introduction
HTTP/2 IntroductionHTTP/2 Introduction
HTTP/2 Introduction
 
HTTP/2 for Developers
HTTP/2 for DevelopersHTTP/2 for Developers
HTTP/2 for Developers
 
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.0 Why, How and When
HTTP 2.0 Why, How and WhenHTTP 2.0 Why, How and When
HTTP 2.0 Why, How and When
 
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
 
HTTP/2 Changes Everything
HTTP/2 Changes EverythingHTTP/2 Changes Everything
HTTP/2 Changes Everything
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016HTTP/2 Update - FOSDEM 2016
HTTP/2 Update - FOSDEM 2016
 
HTTP/2 in Examples
HTTP/2 in ExamplesHTTP/2 in Examples
HTTP/2 in Examples
 
HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know? HTTP 2.0 – What do I need to know?
HTTP 2.0 – What do I need to know?
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
SPDY and HTTP/2
SPDY and HTTP/2SPDY and HTTP/2
SPDY and HTTP/2
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streamingHTTP/2 standard for video streaming
HTTP/2 standard for video streaming
 
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
 
Altitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the Edge
 
HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1HTML5, HTTP2, and You 1.1
HTML5, HTTP2, and You 1.1
 
Altitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly WorkshopAltitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly Workshop
 
HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战HTTP2:新的机遇与挑战
HTTP2:新的机遇与挑战
 

En vedette

Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0
Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0
Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0
Michael Zhang
 

En vedette (17)

The Case for HTTP/2
The Case for HTTP/2The Case for HTTP/2
The Case for HTTP/2
 
HTTP/2 Server Push
HTTP/2 Server PushHTTP/2 Server Push
HTTP/2 Server Push
 
Http/2
Http/2Http/2
Http/2
 
JavaScript innovaties: ECMAScript 6 & 7
JavaScript innovaties: ECMAScript 6 & 7JavaScript innovaties: ECMAScript 6 & 7
JavaScript innovaties: ECMAScript 6 & 7
 
Re-thinking Performance tuning with HTTP2
Re-thinking Performance tuning with HTTP2Re-thinking Performance tuning with HTTP2
Re-thinking Performance tuning with HTTP2
 
Wprowadzenie do HTTP/2
Wprowadzenie do HTTP/2Wprowadzenie do HTTP/2
Wprowadzenie do HTTP/2
 
HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30HTTP2 & HPACK #pyfes 2013-11-30
HTTP2 & HPACK #pyfes 2013-11-30
 
The Fast, The Slow and The Unconverted - Emerce Conversion 2016
The Fast, The Slow and The Unconverted -  Emerce Conversion 2016The Fast, The Slow and The Unconverted -  Emerce Conversion 2016
The Fast, The Slow and The Unconverted - Emerce Conversion 2016
 
Mobile Web Performance - Getting and Staying Fast
Mobile Web Performance -  Getting and Staying FastMobile Web Performance -  Getting and Staying Fast
Mobile Web Performance - Getting and Staying Fast
 
The Case for HTTP/2 - GreeceJS - June 2016
The Case for HTTP/2 -  GreeceJS - June 2016The Case for HTTP/2 -  GreeceJS - June 2016
The Case for HTTP/2 - GreeceJS - June 2016
 
How to Create a Professional Slideshare for Absolute Beginners
How to Create a Professional Slideshare for Absolute BeginnersHow to Create a Professional Slideshare for Absolute Beginners
How to Create a Professional Slideshare for Absolute Beginners
 
Building an Appier Web - London Web Standards - Nov 2016
Building an Appier Web -  London Web Standards - Nov 2016Building an Appier Web -  London Web Standards - Nov 2016
Building an Appier Web - London Web Standards - Nov 2016
 
What does the browser pre-loader do?
What does the browser pre-loader do?What does the browser pre-loader do?
What does the browser pre-loader do?
 
Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0
Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0
Q con shanghai2013- 荣先乾-qzone_touch跨终端优化_v2.0
 
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger BartelWeb Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
 
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
SPDY & HTTP2.0 & QUIC - #bpstudy 2013-08-28
 
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
HTTPS: What, Why and How (SmashingConf Freiburg, Sep 2015)
 

Similaire à Http/2 - What's it all about?

Similaire à Http/2 - What's it all about? (20)

The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2
 
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
The Case for HTTP/2  - Internetdagarna 2015 - StockholmThe Case for HTTP/2  - Internetdagarna 2015 - Stockholm
The Case for HTTP/2 - Internetdagarna 2015 - Stockholm
 
The web is too slow
The web is too slow The web is too slow
The web is too slow
 
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San FranciscoHTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
HTTP colon slash slash: end of the road? @ CakeFest 2013 in San Francisco
 
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考えるIt is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
 
Speed Matters!
Speed Matters!Speed Matters!
Speed Matters!
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital MarketersSearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
 
Hacking Web Performance
Hacking Web Performance Hacking Web Performance
Hacking Web Performance
 
HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015HTTP 2.0 - Web Unleashed 2015
HTTP 2.0 - Web Unleashed 2015
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 
URL Design
URL DesignURL Design
URL Design
 
WebRTC: A front-end perspective
WebRTC: A front-end perspectiveWebRTC: A front-end perspective
WebRTC: A front-end perspective
 
The Case for HTTP/2 - EpicFEL Sept 2015
The Case for HTTP/2 - EpicFEL Sept 2015The Case for HTTP/2 - EpicFEL Sept 2015
The Case for HTTP/2 - EpicFEL Sept 2015
 
A faster journey with HTTP
A faster journey with HTTPA faster journey with HTTP
A faster journey with HTTP
 
High-Speed HTML5
High-Speed HTML5High-Speed HTML5
High-Speed HTML5
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Speed is Essential for a Great Web Experience
Speed is Essential for a Great Web ExperienceSpeed is Essential for a Great Web Experience
Speed is Essential for a Great Web Experience
 
Hacking Web Performance
Hacking Web PerformanceHacking Web Performance
Hacking Web Performance
 

Plus de Andy Davies

Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013
Andy Davies
 

Plus de Andy Davies (18)

Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...
 
Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...Fast Fashion… How Missguided revolutionised their approach to site performanc...
Fast Fashion… How Missguided revolutionised their approach to site performanc...
 
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
AB Testing, Ads and other 3rd party tags - London WebPerf - March 2018
 
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
AB Testing, Ads and other 3rd party tags - SmashingConf London - 2018
 
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
Inspecting iOS App Traffic with JavaScript - JSOxford - Jan 2018
 
Selling Performance - Bristol WebPerf Meetup 2017-07-20
Selling Performance - Bristol WebPerf Meetup 2017-07-20Selling Performance - Bristol WebPerf Meetup 2017-07-20
Selling Performance - Bristol WebPerf Meetup 2017-07-20
 
Speed: The 'Forgotten' Conversion Factor
Speed: The 'Forgotten' Conversion FactorSpeed: The 'Forgotten' Conversion Factor
Speed: The 'Forgotten' Conversion Factor
 
Building an Appier Web - Velocity Amsterdam 2016
Building an Appier Web - Velocity Amsterdam 2016Building an Appier Web - Velocity Amsterdam 2016
Building an Appier Web - Velocity Amsterdam 2016
 
Building an Appier Web - May 2016
Building an Appier Web - May 2016Building an Appier Web - May 2016
Building an Appier Web - May 2016
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
 
Speed matters, So why is your site so slow?
Speed matters, So why is your site so slow?Speed matters, So why is your site so slow?
Speed matters, So why is your site so slow?
 
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
 
EdgeConf - Page Load Performance Opening Talk
EdgeConf - Page Load Performance Opening TalkEdgeConf - Page Load Performance Opening Talk
EdgeConf - Page Load Performance Opening Talk
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
 
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices… Tomorrow’s Performance Anti-Patterns?
 
Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013Web Performance Workshop - Velocity London 2013
Web Performance Workshop - Velocity London 2013
 
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?
Are Today’s Good Practices... Tomorrow’s Performance Anti-Patterns?
 
Are Today's Good Practices… Tomorrow's Performance Anti-Patterns
Are Today's Good Practices… Tomorrow's Performance Anti-PatternsAre Today's Good Practices… Tomorrow's Performance Anti-Patterns
Are Today's Good Practices… Tomorrow's Performance Anti-Patterns
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Http/2 - What's it all about?

  • 1. https://www.flickr.com/photos/expressmonorail/3910036864 HTTP/2 - What’s it all about? @AndyDavies #RevolutionConf, Sept 2014
  • 3. What’s our greatest enemy? https://www.flickr.com/photos/54459164@N00/5218183788
  • 4. The browser that just won’t die?
  • 5. The explosion in device diversity? http://opensignal.com/reports/2014/android-fragmentation/
  • 6. … or maybe latency is our greatest enemy https://www.flickr.com/photos/jjvaca/728072059
  • 7. Backbone Round Trip Times from London http://www.vectortemplates.com BT: http://ippm.bt.net/hour/europe/lo.shtml
  • 8. Backbone Round Trip Times from London http://www.vectortemplates.com 81ms BT: http://ippm.bt.net/hour/europe/lo.shtml 201ms 156ms 266ms 232ms 28ms
  • 9. There’s the last mile latency too (and routers, other networking kit, mobile latencies too) https://www.flickr.com/photos/kiwanja/3170292282
  • 10. (TCP Segments) TCP and the Lower Bound of Web Performance! John Rauser Will probably need more than one round-trip 285kB 214kB 143kB 71kB 1 2 3 4 5 6 7 8 9 10 11 Round Trips Size initcwnd = 3! many sites use 10
  • 11. Higher latency = slower load times Page Load Time (s) 4 3 2 1 0 20 40 60 80 100 120 140 160 180 200 220 240 Round Trip Time (ms) Mike Belshe - “More Bandwidth Doesn’t Matter (much)”
  • 12. Headers are sent with every request Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/ webp,*/*;q=0.8 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:no-cache Cookie:NTABS=B5; BBC-UID= 75620c7ca040deb7c0d3275d81c51c2361684a959e281319b3b5da4dab5958880Mozi lla%2f5%2e0%20%28Macintosh%3b%20Intel%20Mac%20OS%20X %2010%5f9%5f1%29%20AppleWebKit%2f537%2e36%20%28KHTML%2c%20like%20Gecko %29%20Chrome%2f31%2e0%2e1650%2e63%20Safari%2f537%2e36; ckns_policy=111; BGUID=55b28cbc20d2e32f221f3ed0e1be9624c960f93b1e483329c3752a6d253efd40; s1=52CC023F3812005F; BBCCOMMENTSMODULESESSID=L-k22bbkde3jkqf928himljnlkl3; ckpf_ww_mobile_js=on; ckpf_mandolin= %22footer-promo%22%3A%7B%22segment%22%3Anull%2C%22end%22%3A %221392834182609%22%7D; _chartbeat2=ol0j0uq4hkq6pumu. 1389101635322.1392285654268.0111111111111111; _chartbeat_uuniq=1; ecos.dt=1392285758216 Host:www.bbc.co.uk Pragma:no-cache User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/ 537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
  • 13. Headers are sent with every request Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/ webp,*/*;q=0.8 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:no-cache Cookie:NTABS=B5; BBC-UID= And they contain lots 75620c7ca040deb7c0d3275d81c51c2361684a959e281319b3b5da4dab5958880Mozi of repeated data lla%2f5%2e0%20%28Macintosh%3b%20Intel%20Mac%20OS%20X %2010%5f9%5f1%29%20AppleWebKit%2f537%2e36%20%28KHTML%2c%20like%20Gecko %29%20Chrome%2f31%2e0%2e1650%2e63%20Safari%2f537%2e36; ckns_policy=111; BGUID=55b28cbc20d2e32f221f3ed0e1be9624c960f93b1e483329c3752a6d253efd40; s1=52CC023F3812005F; BBCCOMMENTSMODULESESSID=L-k22bbkde3jkqf928himljnlkl3; ckpf_ww_mobile_js=on; ckpf_mandolin= %22footer-promo%22%3A%7B%22segment%22%3Anull%2C%22end%22%3A %221392834182609%22%7D; _chartbeat2=ol0j0uq4hkq6pumu. 1389101635322.1392285654268.0111111111111111; _chartbeat_uuniq=1; ecos.dt=1392285758216 Host:www.bbc.co.uk Pragma:no-cache User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/ 537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36
  • 14. HTTP could use TCP more efficiently http://www.flickr.com/photos/7671591@N08/1469828976
  • 15. We’ve been hacking around the gaps https://www.flickr.com/photos/rocketnumber9/13695281
  • 16. Browsers support more parallel connections Old browsers - 2 parallel connections Today’s browsers - 4 plus connections
  • 17. We split resources across domains www.bbc.co.uk! static.bbci.co.uk! news.bbcimg.co.uk! node1.bbcimg.co.uk
  • 18. We follow recipes e.g. Reduce Requests http://www.flickr.com/photos/mrsmagic/2247364228
  • 19. DataURIs url(data:image/ png;base64,iVBORw0KGgoAA AANSUhEUgAAABkAAAAZCAMAA ADzN3VRAAAAGXRFWHRTb2Z0d 2FyZQBBZG9iZSBJbWFnZVJlY WR5ccllPAAAAAZQTFRF/ wAAAAAAQaMSAwAAABJJREFUe NpiYBgFo2AwAIAAAwACigABt nCV2AAAAABJRU5ErkJggg==) =
  • 20. DataURIs Larger downloads (needs gzip)! Overrides browser priorities url(data:image/ png;base64,iVBORw0KGgoAA AANSUhEUgAAABkAAAAZCAMAA ADzN3VRAAAAGXRFWHRTb2Z0d 2FyZQBBZG9iZSBJbWFnZVJlY WR5ccllPAAAAAZQTFRF/ wAAAAAAQaMSAwAAABJJREFUe NpiYBgFo2AwAIAAAwACigABt nCV2AAAAABJRU5ErkJggg==) =
  • 21. Create CSS and JavaScript bundles + + + + = =
  • 22. Create CSS and JavaScript bundles + + + + = = More to download and parse
  • 23. Create CSS and JavaScript bundles + + + + = = More to download and parse +! x ! Whole bundle is invalidated if a single file changes
  • 25. CSS Sprites To get just one sprite …
  • 26. CSS Sprites To get just one sprite … Browser must download and decode the whole image
  • 27. There’s a tension between development and delivery https://www.flickr.com/photos/domiriel/7376397968
  • 28. Build tools and optimisation services help plug gaps and won’t be going away…
  • 29. But couldn’t we be more efficient? https://www.flickr.com/photos/belsymington/4102783610
  • 30. HTTP/2 (Evolved from Google’s SPDY)
  • 31. Single multiplexed connection to host HTTP/2 HTTP/1.1
  • 33. How much of an image do we need to make it usable - 5%? Experiment by John Mellor at Google
  • 34. How much of an image do we need to make it usable - 15%?
  • 35. How much of an image do we need to make it usable - 25%?
  • 36. How much of an image do we need to make it usable - 80%?
  • 37. How much of an image do we need to make it usable - 80%? There are some questions over the user experience with progressive images
  • 38. HTTP/1.1 - browser sets priorities
  • 39. HTTP/2 - browser hints priorities server can override them
  • 41. Google and Mozilla will only support over HTTPS http://www.flickr.com/photos/forsytht/4553656244
  • 42. Browsers pull resources from the server but … https://www.flickr.com/photos/steveweaver/2915792034
  • 43. What if the server could push them? https://www.flickr.com/photos/christian_bachellier/582457911
  • 44. Loading a web page Browser Server Server builds page GET index.html <html><head>… Request other page resources
  • 45. Loading a web page Browser Server Server builds page GET index.html <html><head>… Network Idle Request other page resources
  • 46. Browser Server Server builds page GET index.html Push critical resource e.g. CSS <html><head>… Server Push Request other page resources
  • 47. Browser Server Server builds page GET index.html Push critical resource e.g. CSS <html><head>… Request other page resources Server Push
  • 48. Browser Server Server builds page GET index.html Push critical resource e.g. CSS <html><head>… Request other page resources Server Push Browser can reject push
  • 49. Other opportunities for server push? HTML CSS DOM CSSOM Render! Tree JavaScript Layout Paint
  • 50. Other opportunities for server push? HTML CSS DOM CSSOM Render! Tree Fonts and background images discovered when render tree builds JavaScript Layout Paint
  • 51. Other opportunities for server push? HTML CSS DOM CSSOM Render! Tree Fonts and background images discovered when render tree builds JavaScript Layout Paint Could we push them?
  • 53. Challenges We need to get better at HTTPS! Bulletproof SSL and TLS, Ivan Rustic! https://www.ssllabs.com/ssltest/! https://istlsfastyet.com/! ! Need support in mainstream servers! ! Differing optimisations for HTTP/1.1 and HTTP/2 (and indeed other contexts e.g. mobile)
  • 54. HTTP/2 is coming! It uses the network more efficiently! Enables server to push resources! ! It will change the way build and deliver sites! ! Go Play!
  • 56. http://www.flickr.com/photos/auntiep/5024494612 ! @andydavies! ! andy.davies@nccgroup.com ! ! http://slideshare.net/andydavies!