SlideShare a Scribd company logo
Site Speed Fundamentals
What is Site Speed?
Site Speed -> Page Speed
Site Speed Fundamentals
Site Speed Fundamentals
Time until page gets fully loaded.
Time until user can
start interacting with page.
Why is Site Speed important?
Need for speed is proven
http://www.nngroup.com/articles/response-times-3-important-limits/
Jakob Nielsen on response time limits
0.1 seconds
make user feel that the system is reacting instantaneously
http://www.nngroup.com/articles/response-times-3-important-limits/
Jakob Nielsen on response time limits
0.1 seconds
make user feel that the system is reacting instantaneously
1 second
is the limit for the user's flow of thought to stay uninterrupted
http://www.nngroup.com/articles/response-times-3-important-limits/
Jakob Nielsen on response time limits
0.1 seconds
make user feel that the system is reacting instantaneously
1 second
is the limit for the user's flow of thought to stay uninterrupted
10 seconds
is the limit for keeping the user's attention focused on the dialogue
Site speed has
an impact on conversion rates ...
http://de.slideshare.net/devonauerswald/walmart-pagespeedslide
… and other business metrics
● bounce rate
● cart size
● revenue
● time on site
● page views
http://www.soasta.com/whitepapers/time-is-money-the-business-value-of-web-performance/
Time is Money, The Business Value of Web Performance, Tammy Everts
● user satisfaction
● user retention
● organic search traffic
● brand perception
● productivity
However sites are getting bigger
http://httparchive.org/trends.php?
s=All&minlabel=Jan+1+2014&maxlabel=Oct+15+2015#bytesTotal&reqTotal
But next billion users will access Web ...
… through feature phones, like a Nokia X2-01, ...
https://brucelawson.github.io/talks/2015/velocity/velocity-AMS.pdf
Top Handsets: India
... and bad (2G) networks
https://brucelawson.github.io/talks/2015/velocity/velocity-AMS.pdf
Network Bangladesh
https://www.stateoftheinternet.com/trends-visualizations-
connectivity-global-heat-map-internet-speeds-broadband-adoption.
html
What does Site Speed depend on?
Latency and bandwidth mostly
Latency
Time from source sending a packet to destination receiving it
Latency
Time from source sending a packet to destination receiving it
Bandwidth
Maximum throughput of a logical or physical communication path
http://chimera.labs.oreilly.com/books/1230000000545/ch01.html
Submarine fibre links 70 Tbit/s
http://submarinecablemap.com
http://www.speedtest.net
Last mile Leipzig cable 5 Mbit/s
Last mile Bangladesh 2G EDGE network 500 Kbit/s
Site speed depends
most on network latency
and round trip times (RTT) ...
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Distance 2235 km
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Distance 2235 km
RTT 42.45 ms
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Distance 2235 km
RTT 42.45 ms
Speed of light in vacuum = ~300 km/ms
Speed of light in optical fiber = ~200 km/ms
RTT = 2236 km * 1 ms / 200 km * 2 = 22.36 ms
Deviation = 22.36 ms / 42.45 ms - 100 = 47,32%
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Distance 13822 km
Dallas
New York
Sydney
https://wondernetwork.com/pings/Dallas
Distance 13822 km
RTT 194.23 ms
Site speed depends
on DNS lookup, TCP handshake
and TCP slow-start
Application Layer
Transport Layer
Network Layer
Network Interface
Layer
Short reminder - TCP/IP Network Model
TCP/IP Layers
HTTP
TCP/IP Protocols
FTP Telnet SMTP DNS
TCP UDP
IP ARP ICMP IGMP
Ethernet Token Ring
Other Link-Layer
Protocols
https://en.wikipedia.org/wiki/Internet_protocol_suite
Loading a basic Web site ...
we need DNS
● to resolve domain name, i.e. www.spreadshirt.com, to IP address
we need HTTP
● to load HTML and depending resources like CSS, Javascript and Images
Application Layer
Transport Layer
Network Layer
Network Interface
Layer
DNS Protocol Stack
TCP/IP Layers
HTTP
TCP/IP Protocols
FTP Telnet SMTP DNS
TCP UDP
IP ARP ICMP IGMP
Ethernet Token Ring
Other Link-Layer
Protocols
https://en.wikipedia.org/wiki/Internet_protocol_suite
Application Layer
Transport Layer
Network Layer
Network Interface
Layer
HTTP Protocol Stack
TCP/IP Layers
HTTP
TCP/IP Protocols
FTP Telnet SMTP DNS
TCP UDP
IP ARP ICMP IGMP
Ethernet Token Ring
Other Link-Layer
Protocols
https://en.wikipedia.org/wiki/Internet_protocol_suite
Ethernet
IP
TCP
Protocols are wrapped in each other
HTTP
Ethernet
IP
TCP
Each protocol adds additional overhead
HTTP
Ethernet header … (uncompressed)
IP header … (uncompressed)
TCP header … (uncompressed)
HTTP Header … (uncompressed)
HTTP Payload … (compressed or uncompressed)
like HTML, Javascript, CSS, Images
1460 byte payload
1480 byte payload
1500 byte payload
Three-way handshake starts
TCP connection
http://chimera.labs.oreilly.com/books/1230000000545/ch02.html
Data exchange starts via TCP slow-start
Site Speed Fundamentals
Site Speed Fundamentals
Site Speed Fundamentals
How many round trips do we need for
loading a Web page?
Round trips required
DNS
lookup
1 RTT
TCP
handshake
1 RTT
HTTP Request
1-n RTTs
How many round trips are required for loading
www.speadshirt.com from different locations?
DNS TCP handshake HTTP request Sum
Dallas - New York 42.45 ms 42.45 ms 2 x 42.45 ms 169.80 ms (4)
Dallas - Sydney 194.23 ms 194.23 ms 2 x 194.23 ms 776.92 ms (4)
spreadshirt.com = 500 byte (header) + 24 kb (compressed payload) = 25 576 byte
segments = 25 576 byte / 1460 byte = 17,5 = ~18
initial congestion window (segments) = 10 (instead of 4 see link) -> 14 600 byte
https://tools.ietf.org/html/rfc6928
Increase of initial congestion window from 4 to 10
Why don’t we use multiple TCP connections
to parallelize things?
Number of TCP connections per domain is limited
http://www.browserscope.org/?category=network&v=top
Browser Connections per Domain Max Connections
Chrome 46.0.2490 6 10
Safari 9.0.1 6 16
Firefox 42.0.1 6 17
Internet Explorer 11 13 17
Each additional TCP connection
comes at a cost!
Site Speed depends
on processing time
DNS lookup
Initial connection
(TCP handshake +
Client send)
Time to first byte
(Server processing)
Content download
(Client receive)
Site Speed also depends
on critical rendering path (CRP)
and page load times
Render tree construction works as follows
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/
Problem is that
CSS is render blocking
2 critical resources
2 or more round trips for the minimum critical path length
9 KB of critical bytes
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/
Next problem is that
WebFonts block text painting
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/
And Javascript is parser blocking
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/
3 critical resources
2 or more round trips for the minimum critical path length
11 KB of critical bytes
The difference is ...
Site Speed Fundamentals
But wait. Does the whole page need to be
rendered?
Site Speed Fundamentals
Viewport
Viewport
Above the fold
Below the fold
Viewport
Mac
Viewport
IPad
User can start
interacting with page
Page is fully loaded
Page starts loading
How can we measure Site Speed
and its business impact?
Which metrics are available?
Core metrics overview
time to first byte
Core metrics overview
time to first byte start render time
Core metrics overview
time to first byte start render time
above the fold time
Core metrics overview
time to first byte start render time
above the fold time page load time
Metric details
time to first byte start render time page load time fully loaded
above the fold time
Metric details
backend frontend
Metric details
DNS lookup
Init TCP connection
Server processing
Content download
Metric details
Number of resources and transfered bytes +
order of resources
How can we continuously measure
Site Speed?
Generic testing
with WebPagetest
Site Speed Fundamentals
Synthetic monitoring
with Rigor
Site Speed Fundamentals
Real user monitoring
with SOASTA
Site Speed Fundamentals
Site Speed Fundamentals
How can we optimize Site Speed?
How do we find out what needs to be
optimized?
Focus on important pages
● pages that drive in traffic
● pages where people browse and search
● pages that have impact on business metrics
Compare to competition
Focus on frontend rather than backend
backend frontend
Focus on important resources
Have a look at third party content
Have baseline measurements
in connection to business metrics in place
Find out what to optimize
Start with free tools like
● WebPagetest
http://www.webpagetest.org
● PageSpeed Insights
https://developers.google.com/speed/pagespeed/insights/
● Chrome Developer Tools
https://developer.chrome.com/devtools#audits
Consider to buy tools like
● Zoompf
https://zoompf.com
Which optimization rules exist?
Basic Optimizations
● Avoid landing page redirects
● Reuse connections
● Reduce HTTP requests
● Reduce DNS lookups
● Improve server response times
● Leverage caching
● Enable compression
● Minify resources
● Optimize images
● Shard dominant domains
● Serve static content from cookieless domain
● Make Javascript and CSS external
● Optimize CSS delivery
● Prioritize visible content
● Flush document early
● Remove render-blocking Javascript
● Use asynchronous scripts
● Reduce DOM complexity
● Optimize CSS
● Optimize Javascript
● ...
https://developers.google.com/speed/docs/insights/rules
http://stevesouders.com/efws/blogposts.php
Live Demo
HTTP/2 is on its way and will make some
optimizations obsolete
Key take aways
Key take aways
● Latency, bandwidth and TCP/IP network model are limiting factors
● Look at frontend times if you want to improve user experience
● Understand critical rendering path and page load times
● Setup baseline measurements in connection to business metrics
● Optimize in iterations and compare results (or better run A/B tests)

More Related Content

PDF
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Holger Bartel
 
PDF
HTTP/2: What no one is telling you
Fastly
 
PDF
Revisiting HTTP/2
Fastly
 
PDF
What we can learn from CDNs about Web Development, Deployment, and Performance
Fastly
 
PPT
SPDY Talk
Bojan Babic
 
PPTX
HTTP/2 for Developers
Svetlin Nakov
 
PDF
HTTP 2.0 – What do I need to know?
Sigma Software
 
PDF
How Time To First Byte (TTFB) Impacts Your Site’s Performance
Medianova
 
Web Performance in the Age of HTTP/2 - FEDay Conference, Guangzhou, China 19/...
Holger Bartel
 
HTTP/2: What no one is telling you
Fastly
 
Revisiting HTTP/2
Fastly
 
What we can learn from CDNs about Web Development, Deployment, and Performance
Fastly
 
SPDY Talk
Bojan Babic
 
HTTP/2 for Developers
Svetlin Nakov
 
HTTP 2.0 – What do I need to know?
Sigma Software
 
How Time To First Byte (TTFB) Impacts Your Site’s Performance
Medianova
 

What's hot (20)

PDF
HTTP/2 What's inside and Why
Adrian Cole
 
PDF
Http2
Daniel Stenberg
 
PPTX
Introducing HTTP/2
Ido Flatow
 
PPTX
SPDY - or maybe HTTP2.0
Andreas Bjärlestam
 
PDF
Nginx, PHP, Apache and Spelix
Harald Zeitlhofer
 
PPTX
Why your slow loading website is costing you sales and how to fix it
Robert Flournoy
 
PPTX
Why your slow loading website is costing you sales and how to fix it
strommen
 
PDF
HTTP2:新的机遇与挑战
Jerry Qu
 
PPTX
5 steps to faster web sites & HTML5 games - updated for DDDscot
Michael Ewins
 
PDF
What HTTP/2.0 Will Do For You
Mark Nottingham
 
PPTX
Introduction to HTTP/2
Ido Flatow
 
PDF
Getting a Grip on CDN Performance - Why and How
Aaron Peters
 
PPTX
Service workers - Velocity 2016 Training
Patrick Meenan
 
PPTX
HTTP/2 Introduction
Walter Liu
 
PDF
University of Delaware - Improving Web Protocols (early SPDY talk)
Mike Belshe
 
PDF
Keep the Web Fast
Chris Fetherston
 
PPT
21 Www Web Services
royans
 
PDF
HTTP/2 Update - FOSDEM 2016
Daniel Stenberg
 
PPTX
Introduction to HTTP/2
Ido Flatow
 
PDF
Drupal Performance : DrupalCamp North
Philip Norton
 
HTTP/2 What's inside and Why
Adrian Cole
 
Introducing HTTP/2
Ido Flatow
 
SPDY - or maybe HTTP2.0
Andreas Bjärlestam
 
Nginx, PHP, Apache and Spelix
Harald Zeitlhofer
 
Why your slow loading website is costing you sales and how to fix it
Robert Flournoy
 
Why your slow loading website is costing you sales and how to fix it
strommen
 
HTTP2:新的机遇与挑战
Jerry Qu
 
5 steps to faster web sites & HTML5 games - updated for DDDscot
Michael Ewins
 
What HTTP/2.0 Will Do For You
Mark Nottingham
 
Introduction to HTTP/2
Ido Flatow
 
Getting a Grip on CDN Performance - Why and How
Aaron Peters
 
Service workers - Velocity 2016 Training
Patrick Meenan
 
HTTP/2 Introduction
Walter Liu
 
University of Delaware - Improving Web Protocols (early SPDY talk)
Mike Belshe
 
Keep the Web Fast
Chris Fetherston
 
21 Www Web Services
royans
 
HTTP/2 Update - FOSDEM 2016
Daniel Stenberg
 
Introduction to HTTP/2
Ido Flatow
 
Drupal Performance : DrupalCamp North
Philip Norton
 
Ad

Similar to Site Speed Fundamentals (20)

PDF
The web is too slow
Andy Davies
 
PDF
Speed Matters!
Andy Davies
 
PPTX
Building Lightning Fast Websites (for Twin Cities .NET User Group)
strommen
 
PDF
Web Performance Optimization @Develer
Massimo Iacolare
 
PPTX
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
Distilled
 
PPTX
Web Performance Hacks
Sagar Desarda
 
PDF
Mobile web performance - MoDev East
Patrick Meenan
 
PDF
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
Holger Bartel
 
PPT
Scaling Front-End Performance - Velocity 2016
Patrick Meenan
 
PDF
Hacking Web Performance 2019
Maximiliano Firtman
 
PPTX
Breaking the Speed Limit: Faster Websites Win
Jonathan Hochman
 
PDF
Speed is Essential for a Great Web Experience
Andy Davies
 
PDF
Cast a wider net
jlembeck
 
PPTX
Web Performance Optimization
Patrick Meenan
 
PPTX
10 things you can do to speed up your web app today stir trek edition
Chris Love
 
KEY
Speed is Essential for a Great Web Experience
Andy Davies
 
KEY
Faster Frontends
Andy Davies
 
PDF
Hacking Web Performance
Maximiliano Firtman
 
PDF
Super speed around the globe - SearchLeeds 2018
Bastian Grimm
 
PDF
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
Branded3
 
The web is too slow
Andy Davies
 
Speed Matters!
Andy Davies
 
Building Lightning Fast Websites (for Twin Cities .NET User Group)
strommen
 
Web Performance Optimization @Develer
Massimo Iacolare
 
SearchLove San Diego 2018 | Mat Clayton | Site Speed for Digital Marketers
Distilled
 
Web Performance Hacks
Sagar Desarda
 
Mobile web performance - MoDev East
Patrick Meenan
 
Web Performance in the Age of HTTP2 - Topconf Tallinn 2016 - Holger Bartel
Holger Bartel
 
Scaling Front-End Performance - Velocity 2016
Patrick Meenan
 
Hacking Web Performance 2019
Maximiliano Firtman
 
Breaking the Speed Limit: Faster Websites Win
Jonathan Hochman
 
Speed is Essential for a Great Web Experience
Andy Davies
 
Cast a wider net
jlembeck
 
Web Performance Optimization
Patrick Meenan
 
10 things you can do to speed up your web app today stir trek edition
Chris Love
 
Speed is Essential for a Great Web Experience
Andy Davies
 
Faster Frontends
Andy Davies
 
Hacking Web Performance
Maximiliano Firtman
 
Super speed around the globe - SearchLeeds 2018
Bastian Grimm
 
SearchLeeds 2018 - Bastian Grimm - Peak Ace - International site speed: Going...
Branded3
 
Ad

Recently uploaded (20)

PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PPTX
Color Model in Textile ( RGB, CMYK).pptx
auladhossain191
 
PDF
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PDF
Software Testing Tools - names and explanation
shruti533256
 
PPT
SCOPE_~1- technology of green house and poyhouse
bala464780
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PPTX
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
PPTX
Information Retrieval and Extraction - Module 7
premSankar19
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
Color Model in Textile ( RGB, CMYK).pptx
auladhossain191
 
Unit I Part II.pdf : Security Fundamentals
Dr. Madhuri Jawale
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
Software Testing Tools - names and explanation
shruti533256
 
SCOPE_~1- technology of green house and poyhouse
bala464780
 
Inventory management chapter in automation and robotics.
atisht0104
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
Information Retrieval and Extraction - Module 7
premSankar19
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 

Site Speed Fundamentals