SlideShare a Scribd company logo
Michael Ewins
@ewinsmi
GlasgowTech MeetUp - 24 June 2015
 40% of people abandon a website that takes
more than 3 seconds to load
Kissmetrics, 2011
 “We surveyed 3000 users… they rated speed
2nd most important”
The Guardian, 2014
Ref: https://blog.kissmetrics.com/loading-time/
Ref: https://speakerdeck.com/patrickhamann/breaking-news-at-1000ms-front-trends-2014
Ref: http://www.webpagetest.org/result/140113_ME_NF2/1/details/
DNS
lookup
TCP
Connection
HTTP
request
HTTP
response
Ref: https://www.igvita.com/posa/high-performance-networking-in-google-chrome/
Render
Ref: http://www.webpagetest.org/result/140113_ME_NF2/1/details/
Requests Bytes
Images 31 714.8 K
Javascript 14 273.1 K
HTML 10 57.2 K
CSS 1 108.5 K
Font 1 23.1 K
TOTAL 57 1176.7 K
DNS
lookup
TCP
Connection
HTTP
request
HTTP
response
Render
 Review the hostnames used by your site.
 How long is DNS cached for?
Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Controlling_DNS_prefetching
 Review the hostnames used by your site.
 How long is DNS cached for?
Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Controlling_DNS_prefetching
DNS
lookup
TCP
Connectio
n
HTTP
request
HTTP
response
Render
 Every connection
is subject toTCP
Handshake
 Distance matters
 Latency matters
Ref: http://www.cdn-locator.com/cdn/edgecast
Ref: http://www.cdn-locator.com/cdn/edgecast
Ref: http://www.webpagetest.org/result/140830_4J_3SR5/3/details/
 Request #8 is a 307 response
 It redirects to a secure file on Akamai
 Extra DNS (45ms)
 Extra connection setup (39ms)
 ExtraTLS setup (264ms)
DNS
lookup
TCP
Connection
HTTP
request
HTTP
response
Render
Ref: http://www.webpagetest.org/result/140909_KN_AS0/2/details/
 Images , JavaScript,
Audio, JSON, etc.
 HTTP 2.0 anti-pattern
Before: http://www.webpagetest.org/result/140821_FS_WDZ/1/details/
After: http://www.webpagetest.org/result/140821_8H_W8A/9/details/
Before After
# File Requests 25 1
Total RequestTime 2054 ms 33 ms
Total ResponseTime 28 ms 37 ms
Bytes Downloaded 45.6 K 31.2 K
DNS
lookup
TCP
Connection
HTTP
request
HTTP
response
Render
Ref: http://www.soasta.com/blog/page-bloat-average-web-page-2-mb/
File Size DownloadTime Saving Browser
1 PNG-24 32079 bytes 395 ms - All
2 JPEG 8457 bytes 63 ms 74% All
3 WEBP 6866 bytes - 79% Not IE
Not Firefox
Not Safari
Ref: https://medium.com/@guypod/high-performance-images-beautiful-shouldn-t-mean-slow-22ffc4e31663
Ref: https://mathiasbynens.be/demo/jquery-size
Ref: https://www.youtube.com/watch?v=C8orjQLacTo
 Review your cookies
 Eliminate cookies for static resources
 HTTP 2.0 – headers are compressed.
Ref: http://www.yuiblog.com/blog/2007/03/01/performance-research-part-3/
DNS
lookup
TCP
Connection
HTTP
request
HTTP
response
Render
Ref: https://www.youtube.com/watch?v=VKTWdaupft0
HTML DOM
CSS CSSOM
Render
Tree
Layout Paint
Ref: http://www.webpagetest.org/result/140909_KN_AS0/
Ref: https://developers.google.com/speed/pagespeed/insights
Ref: http://www.webpagetest.org/result/140915_FF_N34/
Ref: http://deanhume.com/home/blogpost/loading-css-asynchronously/7104
 Javascript is async
 CSS inlined (HTTP 2.0 anti-pattern)
 To do: load non-critical CSS async
Before: http://www.webpagetest.org/result/140909_KN_AS0/
After: http://www.webpagetest.org/result/140915_FF_N34/
Before After
TTFB 0.128 s 0.153 s
Start Render 0.793 s 0.394 s
Speed Index 1010 722
Before: http://www.webpagetest.org/result/140916_9D_QMF/
After: http://www.webpagetest.org/result/140916_QX_PA8/
Before After
TTFB 0.924 s 0.936 s
Start Render 2.592 s 1.491 s
Speed Index 3417 1778
DNS
lookup
TCP
Connection
HTTP
request
HTTP
response
Render
Cache Lookup
Ref: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching
Cache-Control: no-store
Do not cache and fetch on every request
Cache-Control: private, max-age=86400
Cached by browser but not intermediate caches for 1 day.
Cache-Control: public, max-age=31536000
Cached by browser and intermediate caches for 365 days.
Etag: "1404984963"
Avoid repeat download if the resource hasn’t changed.
1. Make fewer requests: remove, concatenate
2. Serve fewer bytes: compression, minification
3. Use a CDN
4. Leverage the browser cache & use Etags
5. Reduce DNS lookups & pre-fetch
6. Eliminate redirects
7. Make Javascript asynchronous
8. Inline critical CSS
Ref: http://stevesouders.com/hpws/rules.php
Michael Ewins
@ewinsmi

More Related Content

What's hot

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
Andy Davies
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
Andy Davies
 
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
Andy Davies
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahooguestb1b95b
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
Andy Davies
 
The Need For Speed
The Need For SpeedThe Need For Speed
The Need For SpeedAndy Davies
 
The web is too slow
The web is too slow The web is too slow
The web is too slow
Andy Davies
 
What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014
What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014
What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014
Bastian Grimm
 
International Site Speed Tweaks - ISS 2017 Barcelona
International Site Speed Tweaks - ISS 2017 BarcelonaInternational Site Speed Tweaks - ISS 2017 Barcelona
International Site Speed Tweaks - ISS 2017 Barcelona
Bastian Grimm
 
API Best Practices
API Best PracticesAPI Best Practices
API Best PracticesUri Lavi
 
High Performance Websites By Souders Steve
High Performance Websites By Souders SteveHigh Performance Websites By Souders Steve
High Performance Websites By Souders Steve
w3guru
 
High Performance Web Sites
High Performance Web SitesHigh Performance Web Sites
High Performance Web Sites
Páris Neto
 
Web Performance 101
Web Performance 101Web Performance 101
Web Performance 101
Uri Lavi
 
The Last Mile
The Last MileThe Last Mile
The Last Mile
Stephen Melrose
 
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?
Andy Davies
 
Web Performance Optimierung - DWX13
Web Performance Optimierung - DWX13Web Performance Optimierung - DWX13
Web Performance Optimierung - DWX13
Walter Ebert
 
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
Andy Davies
 
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
Distilled
 
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
Holger Bartel
 

What's hot (20)

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
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
 
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
 
Csdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer YahooCsdn Drdobbs Tenni Theurer Yahoo
Csdn Drdobbs Tenni Theurer Yahoo
 
Making Mobile Sites Faster
Making Mobile Sites FasterMaking Mobile Sites Faster
Making Mobile Sites Faster
 
The Need For Speed
The Need For SpeedThe Need For Speed
The Need For Speed
 
The web is too slow
The web is too slow The web is too slow
The web is too slow
 
What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014
What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014
What's in my SEO Toolbox: Linkbuilding Edition - SMX Milan 2014
 
International Site Speed Tweaks - ISS 2017 Barcelona
International Site Speed Tweaks - ISS 2017 BarcelonaInternational Site Speed Tweaks - ISS 2017 Barcelona
International Site Speed Tweaks - ISS 2017 Barcelona
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
High Performance Websites By Souders Steve
High Performance Websites By Souders SteveHigh Performance Websites By Souders Steve
High Performance Websites By Souders Steve
 
High Performance Web Sites
High Performance Web SitesHigh Performance Web Sites
High Performance Web Sites
 
Plop
PlopPlop
Plop
 
Web Performance 101
Web Performance 101Web Performance 101
Web Performance 101
 
The Last Mile
The Last MileThe Last Mile
The Last Mile
 
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?
 
Web Performance Optimierung - DWX13
Web Performance Optimierung - DWX13Web Performance Optimierung - DWX13
Web Performance Optimierung - DWX13
 
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
Speed is Essential for a Great Web Experience (Digicure - Copenhagen)
 
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
 
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
 

Viewers also liked

Inbound Certification - HubSpot
Inbound Certification - HubSpotInbound Certification - HubSpot
Inbound Certification - HubSpot
Carly Callahan
 
1. modul pengajar
1. modul pengajar1. modul pengajar
1. modul pengajar
Ve Ry
 
Ornamental appletrees in Russian
Ornamental appletrees in RussianOrnamental appletrees in Russian
Ornamental appletrees in Russian
Puutarha Tahvoset Oy
 
Seabuckthorn in Russian
 Seabuckthorn in Russian Seabuckthorn in Russian
Seabuckthorn in Russian
Puutarha Tahvoset Oy
 
Hedelmäpuuesite. Päärynä, luumu ja kirsikka.
Hedelmäpuuesite. Päärynä, luumu ja kirsikka.Hedelmäpuuesite. Päärynä, luumu ja kirsikka.
Hedelmäpuuesite. Päärynä, luumu ja kirsikka.
Puutarha Tahvoset Oy
 
Mansikkaesite - Puutarha Tahvoset
Mansikkaesite - Puutarha TahvosetMansikkaesite - Puutarha Tahvoset
Mansikkaesite - Puutarha Tahvoset
Puutarha Tahvoset Oy
 

Viewers also liked (6)

Inbound Certification - HubSpot
Inbound Certification - HubSpotInbound Certification - HubSpot
Inbound Certification - HubSpot
 
1. modul pengajar
1. modul pengajar1. modul pengajar
1. modul pengajar
 
Ornamental appletrees in Russian
Ornamental appletrees in RussianOrnamental appletrees in Russian
Ornamental appletrees in Russian
 
Seabuckthorn in Russian
 Seabuckthorn in Russian Seabuckthorn in Russian
Seabuckthorn in Russian
 
Hedelmäpuuesite. Päärynä, luumu ja kirsikka.
Hedelmäpuuesite. Päärynä, luumu ja kirsikka.Hedelmäpuuesite. Päärynä, luumu ja kirsikka.
Hedelmäpuuesite. Päärynä, luumu ja kirsikka.
 
Mansikkaesite - Puutarha Tahvoset
Mansikkaesite - Puutarha TahvosetMansikkaesite - Puutarha Tahvoset
Mansikkaesite - Puutarha Tahvoset
 

Similar to A faster journey with HTTP

5 Steps to Faster Web Sites and HTML5 Games
5 Steps to Faster Web Sites and HTML5 Games5 Steps to Faster Web Sites and HTML5 Games
5 Steps to Faster Web Sites and HTML5 Games
Michael Ewins
 
5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot
Michael Ewins
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?Andy Davies
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
topgeek
 
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
Alessandro Nadalin
 
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
Andy Davies
 
The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2
GreeceJS
 
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
Paul Calvano
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End Performance
Chris Love
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
Martin Breest
 
High Performance Websites
High Performance WebsitesHigh Performance Websites
High Performance Websites
Parham
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
Peter Gfader
 
Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)
Andy Davies
 
SQL Server On SANs
SQL Server On SANsSQL Server On SANs
SQL Server On SANs
Quest Software
 
Web Performance Hacks
Web Performance HacksWeb Performance Hacks
Web Performance Hacks
Sagar Desarda
 
Faster Frontends
Faster FrontendsFaster Frontends
Faster Frontends
Andy Davies
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016
jancbeck
 
Dyna trace
Dyna traceDyna trace
Dyna trace
Yasmine Gaber
 
WebPerformance: Why and How? – Stefan Wintermeyer
WebPerformance: Why and How? – Stefan WintermeyerWebPerformance: Why and How? – Stefan Wintermeyer
WebPerformance: Why and How? – Stefan Wintermeyer
Elixir Club
 

Similar to A faster journey with HTTP (20)

5 Steps to Faster Web Sites and HTML5 Games
5 Steps to Faster Web Sites and HTML5 Games5 Steps to Faster Web Sites and HTML5 Games
5 Steps to Faster Web Sites and HTML5 Games
 
5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot5 steps to faster web sites & HTML5 games - updated for DDDscot
5 steps to faster web sites & HTML5 games - updated for DDDscot
 
Http/2 - What's it all about?
Http/2  - What's it all about?Http/2  - What's it all about?
Http/2 - What's it all about?
 
腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站腾讯大讲堂09 如何建设高性能网站
腾讯大讲堂09 如何建设高性能网站
 
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
 
URL Design
URL DesignURL Design
URL Design
 
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
 
The case for HTTP/2
The case for HTTP/2The case for HTTP/2
The case for HTTP/2
 
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
NYC WebPerf Meetup Feb 2020 - Measuring the Adoption of Web Performance Techn...
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End Performance
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
 
High Performance Websites
High Performance WebsitesHigh Performance Websites
High Performance Websites
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 
Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)Speed is Essential for a Great Web Experience (Canvas Conf Version)
Speed is Essential for a Great Web Experience (Canvas Conf Version)
 
SQL Server On SANs
SQL Server On SANsSQL Server On SANs
SQL Server On SANs
 
Web Performance Hacks
Web Performance HacksWeb Performance Hacks
Web Performance Hacks
 
Faster Frontends
Faster FrontendsFaster Frontends
Faster Frontends
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016
 
Dyna trace
Dyna traceDyna trace
Dyna trace
 
WebPerformance: Why and How? – Stefan Wintermeyer
WebPerformance: Why and How? – Stefan WintermeyerWebPerformance: Why and How? – Stefan Wintermeyer
WebPerformance: Why and How? – Stefan Wintermeyer
 

Recently uploaded

What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 

Recently uploaded (20)

What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 

A faster journey with HTTP

Editor's Notes

  1. Welcome
  2. 1. Abandonment. Kissmetrics (web analytics platform) survey from 2011. Many similar studies. 2. Loss in revenues. Aberdeen Group – technology focused research group have found that: 1% delay >> 7% loss of conversions >> $100K per day >> 7% translates to $2.5M per year 3. Users. See Guardian survey. Rated speed 2nd most important only after easy to find content. 4. Growth. Fred Wilson from USV (twitter, soundcloud) “speed is most important” 5. How fast should we be? 1 second (flow) + 10 seconds (abandon) Ref: http://www.nngroup.com/articles/response-times-3-important-limits/ http://www.getelastic.com/mobile-commerce-performance/
  3. 1. HTML5 Games Portal for mobile / tablet / PC developed by iWin 2. Jewel Quest (match 3) and Bubble Town (bubble popper). 3. Speed is important: tablet (55%); mobile (28%); desktop (17%) + engage with the games / view adverts that pay for the games
  4. Measure before we launch – script WPT with fake HOST file entry. Create an account so you get a record of results Run 9 tests so median is reported Take a video so Speed Index is recorded – measure of visual completeness not how quick you render the full page (2 pages 100% complete at same time but one renders more of the page sooner will have a lower speed index) Interaction Time Ref: https://community.nccgroup-webperf.com/2015/06/speed-index-how-it-works-and-what-it-means/
  5. 1. obtain the IP address: cached? chrome://net-internals/#dns 2. New TCP connection incurs the Three-Way Handshake which adds a full roundtrip of latency. 3. Ignoring SSL / HTTPS – it will incur 1-2 additional round trips - HTTP2 must have 4. Dispatch the HTTP request to the server. 5. HTTP Response delivered in multiple packets 6. Then the response needs to be rendered – request all resources in the html 7. Browser cache – kicks in for repeat visits. chrome://view-http-cache/ For timings from http://www.webpagetest.org/result/140831_E3_E1J/2/details/ See http://www.cdnplanet.com/blog/tune-tcp-initcwnd-for-optimum-performance/
  6. 1. Multiple DNS lookups 2. Multiple connections 3. Multiple requests 4. Multiple responses
  7. Our original design has numerous game images displayed off screen. So we dropped / defered loading of those images. In a later design we also dropped hidden carousel images.
  8. 1. Options limited to things we can control 2. Number of domains referenced – can we reduce? (e.g. events.iwin.com >> m.iwin.com/events) 3. TTL – maybe good reason for 1 minute or 5 minutes or 7 days. Reason? Costs linked to TTL. 4. DNS prefetch (see example). Separate browser thread for DNS lookups - in parallel to downloads and rendering. 4.1 Resource Hint spec: preconnect, prefetch, prerender http://daker.me/2013/05/5-html5-features-you-need-to-know.html $ dig +nocmd +noall +answer +ttlid a m.iwin.com m.iwin.com. 604800 IN CNAME m.iplay.mobi. m.iplay.mobi. 60 IN A 54.209.107.239 $ dig +nocmd +noall +answer +ttlid a games.iwin.com games.iwin.com. 604800 IN CNAME wpc.81CD.edgecastcdn.net. wpc.81CD.edgecastcdn.net. 3600 IN CNAME gs1.wpc.v1cdn.net. gs1.wpc.v1cdn.net. 600 IN A 72.21.81.131 $ dig +nocmd +noall +answer +ttlid a ma.iwin.com ma.iwin.com. 604800 IN CNAME cds.n5v6x5m3.hwcdn.net. cds.n5v6x5m3.hwcdn.net. 300 IN A 205.185.216.10
  9. 1. Options limited to things we can control 2. Number of domains referenced – can we reduce? (e.g. events.iwin.com >> m.iwin.com/events) 3. TTL – maybe good reason for 1 minute or 5 minutes or 7 days. Reason? Costs linked to TTL. 4. DNS prefetch (see example). Separate browser thread for DNS lookups - in parallel to downloads and rendering. 4.1 Resource Hint spec: preconnect, prefetch, prerender http://daker.me/2013/05/5-html5-features-you-need-to-know.html $ dig +nocmd +noall +answer +ttlid a m.iwin.com m.iwin.com. 604800 IN CNAME m.iplay.mobi. m.iplay.mobi. 60 IN A 54.209.107.239 $ dig +nocmd +noall +answer +ttlid a games.iwin.com games.iwin.com. 604800 IN CNAME wpc.81CD.edgecastcdn.net. wpc.81CD.edgecastcdn.net. 3600 IN CNAME gs1.wpc.v1cdn.net. gs1.wpc.v1cdn.net. 600 IN A 72.21.81.131 $ dig +nocmd +noall +answer +ttlid a ma.iwin.com ma.iwin.com. 604800 IN CNAME cds.n5v6x5m3.hwcdn.net. cds.n5v6x5m3.hwcdn.net. 300 IN A 205.185.216.10
  10. 1. Connections require a round trip to the server 2. Traceroute (RTT) from my home to AWS East and AWS West. Distance matters. 3. Scotland - AWS East RTT 110ms 4. Scotland – AWS West RTT approx 190ms
  11. More servers if content is dynamic or not cacheable at CDN. Use GeoDNS. 2. Use a CDN for static content. Edgecast have 19 PoPs. 3. Some CDNs may not support what you are trying to do. E.g. caching by device type. At least OOTB. Google CDN for jQuery: https://stackoverflow.com/questions/5206666/jquery-ui-how-to-use-google-cdn This approach is interesting because your user may already have this file from another web site. May 2013 - Approx 20% of sites use Jquery from google cdn http://www.stevesouders.com/blog/2013/03/18/http-archive-jquery/ GeoDNS: http://serverfault.com/questions/325076/what-is-the-difference-between-anycast-and-geodns-geoip-wrt-ha http://www.cdnplanet.com/tools/cdnfinder/#site:http://m.iwin.com http://visualwebsiteoptimizer.com/split-testing-blog/geo-distributed-architecture/ http://www.cedexis.com/blog/fun-with-headers/ http://www.semicomplete.com/blog/geekery/ssl-latency.html http://blog.radware.com/applicationdelivery/applicationaccelerationoptimization/2014/04/7-mobile-performance-myths/ https://www.igvita.com/2014/03/26/why-is-my-cdn-slow-for-mobile-clients/
  12. So we make a request and the first thing that the server does is issue a redirect response. In this example (for an advert) We are redirected to a new domain: DNS lookup We then need a new connection And this is a secure domain so we also have TLS setup. And then we can download the content.
  13. 1. Time spent by the backend server to respond to deliver the HTML 2. In our case this is 41ms. We’re serving from an in-memory cache called Varnish. 3. Unique user behaviours we have pushed to the client (e.g. user id generation). 4. We cache different versions based on device behaviour. 5. Entire talk on this alone.
  14. 1. Refactored to a single level JSON file 2. Bytes downloaded and download time are similar to before. 3. But the request time (TTFB) is down from 2 second to 33 ms. 4. Making lots of requests is bad for performance because it increases the effect of latency. 5. TTFB = time for a request to leave browser, travel to server and return
  15. This data is from HTTP Archive And images continue to be the biggest culprit
  16. Photos – JPEG, PNG-24 Low complexity (few colors) – GIF, PNG-8 Low complexity with transparency – GIF, PNG-8 High complexity with transparency – PNG-24 Line art – SVG Kraken.io 3. WebP is new image compression format developed by Google. Limited Browser support. 4. If we apply similar compression to all images on home page then we reduce to 840 ms elapsed time (from 1438 ms) http://calendar.perfplanet.com/2014/images-are-king-an-image-optimization-checklist-for-everyone-in-your-organization/
  17. 1. GZIP compresses the file on the server as it is requested (cache this response) 3. Compression is quick and the uncompress is also quick on the client. 4. Don’t do this for binary formats that are already compressed. 5. Some CDNs require you to expose both gzip and non gzip. 6. Applies to Javascript and other text formats.
  18. Each segment is 1460 bytes With init_cwnd of 3 then a 61K html would take 6 round trips. With init_cwnd of 10 then a 61K html would take 3 round trips. Deliver smaller images first. John Rauser talk at Velocity in May 2015.
  19. 1. Review all cookies. Use local storage 80ms per 4K: http://www.yuiblog.com/blog/2007/03/01/performance-research-part-3/ http://www.jonathanklein.net/2014/02/revisiting-cookieless-domain.html https://twitter.com/csswizardry/status/280639163789893632 http://www.geedew.com/2014/02/26/the-case-for-critical-assets/
  20. 1. Critical rendering path is the sequence of resources that are needed to render a page. 2. Firstly we load and parse the HTML. This may identify other resources it needs to complete the render. 3. Download / parse / execute JS files needed to further construct the DOM. Could be multiple JS files. Request round-trips are expensive. JS blocks the DOM construction. 4. Download / parse / process CSS that blocks construction of the Render tree. 5. The render cannot complete until DOM and CSS ready, render tree ready, layout is ready.
  21. 1. Google Pagespeed Insights can tell you what resources are on the critical rendering path: 3 x JavaScript files and 2 x CSS files 2. If we put them in the HTML then the browser will block because it thinks it needs them to construct the DOM and the render tree. 3. Each of these resources require us to request / download / parse time.
  22. 1. All JS is async and inlined all CSS 2. Initial download is longer 3. Still doing the same JS processing. http 2.0 anti-pattern cos you cannot cache
  23. These optimizations have bigger effects where network latency is slower. Web Page Test – traffic shaping Speed Index is the average time at which visible parts of the page are displayed. It is expressed in milliseconds and dependent on size of the view port.
  24. 1. Use browser cache to avoid making repeat requests 2. Four examples on the slide: no cache; browser/1day; browser+CDN/365d; Etags 3. Checklist: what can be cached (query params, case sensitive URLs); how long / what changes frequently?; how to invalidate?. 4. Advanced concepts like gzip; what happens when caches invalidate Flowchart: https://developers.google.com/speed/docs/insights/LeverageBrowserCaching New headers: http://www.fastly.com/blog/stale-while-revalidate/#.VBoRCS5dUZw Vary: Accept-Encoding -Caches should only be used if the incoming request matches the Vary information in the cache. With gzip. http://blog.maxcdn.com/accept-encoding-its-vary-important/ Checklist: https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching#caching-checklist