This document discusses measuring and analyzing web latency. It provides an overview of key latency metrics like server rendering time and time to load. It describes how to monitor latency over time and analyze trends. It also discusses testing latency through synthetic benchmarks and real user monitoring. The document emphasizes the importance of understanding client-side rendering times and how latency can be impacted by many factors.
2. Agenda
• Web Performance Optimization
• Measuring Web Latency
• Latency Monitoring and Analysis
• Testing Latency
3. Web Performance Optimization
• Customer satisfaction & loyalty
– White page of death
– “World Wide Wait”
• Faster pages = longer sessions
– Sales opportunities
– Ads impressions
• Competitive Advantage
– Better customer experience
– Factor in SEO rankings
4. Latency Metrics
• Understand what you’re optimizing and quantify impact.
– serverRenderTime (webserver render time)
• time delay on the webserver since receiving the HTTP
request to when generating and emitting the last byte of
content to the client.
– clientPageLoaded (browser render time)
• time delay spent on the browser since receiving the first
HTML response byte to when the DOM load event is fired.
– clickToPageLoaded (complete rendering time)
• time delay experienced by the customer since when
initiating navigation to when the page loaded.
28. Understats and overstats
• The inverse of a percentile.
• Percentiles
– Constant percentage (e.g. 50%)
– Variable measurement (e.g. latency in ms)
• Understatistics and overstatistics
– Constant measurement (e.g. latency <1000ms)
– Variable percentage (e.g. percentage of hits)
• Understat x = percentage of hits with latency under x ms
35. DOM Content Loaded
domLoadingToDomContentLoaded =
domContentLoadedEventStart - domLoading
Influencing Backend Front-end
Network Server Browser
Factor Application Application
DOM
Content ✓ ✓ ✓
Loaded
36. Root Cause: Content Change
Date Press Release Title
Updated Amazon Cloud Player Includes New Scan
7/31/2012 and Match Technology, Free Audio Quality
Upgrades, and More
Amazon.com Announces Second Quarter Sales
7/26/2012
up 29% to $12.83 Billion
Amazon Launches Innovative New Education
Initiative, Paying 95% of Tuition Costs for
7/23/2012
Employees to Pursue Their Aspirations – Whether
at Amazon, or in Another Industry
Amazon.com Books Editors Announce the Big Fall
7/23/2012
Books Preview
On Prime Instant Video First: Amazon Announces
Digital Video License Agreement with Warner
7/20/2012 Bros. Domestic Television Distribution, Bringing
Acclaimed TV Shows Exclusively to Kindle Fire
and Prime Customers
Amazon Web Services Introduces New Amazon “Jeff Letter”
7/19/2012
EC2 High I/O Instance Type on Gateway Page
Amazon.com to Webcast Second Quarter 2012
7/12/2012
Financial Results Conference Call
39. Key Takeaways
• Invest in Latency Monitoring
– 80% of the latency is on the client
– Navigation Timing cross-browser API
• Browser rendering is complex
– Latency easily influenced by context
– Lab traffic is different from the mix from real customers
• Look at your data
– Average poorly represents a population
– Control releases using A/B testing
40. Q&A
“Premature optimization is the root of all evil.”
– Donald Knuth