Website Latency Diagnostics
Upcoming SlideShare
Loading in...5
×
 

Website Latency Diagnostics

on

  • 1,706 views

Understanding what contributes to slow-loading web-pages as perceived by your real users the first step to tackle potential performance improvements. A faster website means better user-experience ...

Understanding what contributes to slow-loading web-pages as perceived by your real users the first step to tackle potential performance improvements. A faster website means better user-experience which translates into incremental business benefits.

Statistics

Views

Total Views
1,706
Views on SlideShare
1,706
Embed Views
0

Actions

Likes
2
Downloads
18
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Website Latency Diagnostics Website Latency Diagnostics Presentation Transcript

  • Website Latency Diagnostics alex.burciu @ amazon.com bad robot.
  • Agenda• Web Performance Optimization• Measuring Web Latency• Latency Monitoring and Analysis• Testing Latency
  • 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
  • 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.
  • Metrics Relations(?) clickToPageLoaded = serverRenderTime + clientPageLoaded(?) serverRenderTime > clientPageLoaded
  • Browser-webserver Interaction serverRenderTimeClick PL Unload RTT Response Transfer DOM Redirect Cache clientPageLoaded DNS TCP SSL
  • HTTP Flushing serverRenderTimeClick PL Unload RTT Response transfer DOM Redirect Cache clientPageLoaded DNS TCP SSL
  • HTTP Caching clientPageLoadedClick PL Unload DOM Redirect Cache
  • Back-Forward Rendering CacheClick PL Redirect Cache
  • Pre-rendering serverRenderTime PL Click Unload RTT Transfer DOM Redirect Cache clientPageLoaded DNS TCP SSL
  • Navigation Timing (pre-request)Click Redirect Cache DNS TCP Connection SSL Req... Unload
  • Navigation Timing (pre-request) navigationStart fetchStart unloadEventStart domainLookupStart secureConnectionStart redirectStart connectStart requestStartClick Unload Redirect Cache DNS TCP Connection SSL Req... redirectEnd connectEndunloadEventEnd domainLookupEnd
  • Navigation Timing (post-request) Response Request DOM Processing onLoad PL
  • Navigation Timing (post-request) domLoadingrequestStart domInteractive responseStart domContentLoadedEventStart loadEventStart Request Response DOM Processing onLoad PL responseEnd domComplete domContentLoadedEventEnd loadEventEnd
  • PageLoad Lifetime navigationStart redirect fetchStart connect dns requestStart responseStart domLoading unloadEvent domInteractive domContentLoaded domComplete loadEvent0 2,000 4,000 6,000 8,000 10,000 12,000 14,000
  • Navigation Timing JavaScript API>> window.performance.timingPerformanceTiming connectEnd: 1344530318281 connectStart: 1344530318281 domComplete: 1344530330212 domContentLoadedEventEnd: 1344530321367 domContentLoadedEventStart: 1344530320211 domInteractive: 1344530320048 domLoading: 1344530318567 domainLookupEnd: 1344530317143 domainLookupStart: 1344530317143 fetchStart: 1344530318281 loadEventEnd: 1344530330214 loadEventStart: 1344530330212 navigationStart: 1344530317144 redirectEnd: 1344530318281 redirectStart: 1344530317149 requestStart: 1344530318283 responseEnd: 1344530319479 responseStart: 1344530318566 secureConnectionStart: 0 unloadEventEnd: 1344530319045 unloadEventStart: 1344530318567
  • Page Responsiveness clickToFirstByte = responseStart - navigationStart Influencing Backend Front-end Network Server Browser factor Application ApplicationUnload ✓ ✓Redirect ✓ ✓ ✓Cache ✓ ✓DNS ✓ ✓Connection ✓ ✓ ✓ ✓SSL ✓ ✓Request ✓ ✓ ✓Response ✓ ✓ ✓
  • End-to-end Latency clickToPageLoaded = loadEventEnd - navigationStart Influencing Backend Front-end Network Server Browser factor Application ApplicationclickToFB ✓ ✓ ✓ ✓ ✓DOM ✓ ✓ ✓ ✓ ✓InteractiveDOMContent ✓ ✓ ✓LoadedDOM ✓ ✓ ✓CompleteDOM Load ✓ ✓Event
  • Testing Web PerformanceSynthetic Benchmarking – Generated traffic – Limited context Real Users Monitoring – Subset of pages – Prod traffic – On-demand – Context-aware – Expensive – All visited pages – Continuous – Cheap
  • Average Daily Latency in 3 months
  • Average Daily Latency in 3 months
  • Avg Daily Latency vs Traffic
  • Avg Daily Latency vs Traffic
  • Avg Hourly Latency vs Traffic
  • Prev Week Avg Hourly Latency &Traffic
  • Percentile Metrics• P(x) = variable value for which x% of the variables are smaller P25 = first quartile (Q1) P50 = median (Q2) P75 = third quartile (Q3)• Example – 10, 770, 40, 60, 50, 880, 9999, 30, 30, 20, 10 – 10, 10, 20, 30, 30, 40, 50, 60, 770, 880, 9999• Average vs P50: 1,081 > 40
  • Prev Week Hourly Latency Percentiles
  • 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
  • Prev Week Traffic% under 2 seconds
  • Prev Week Traffic% under 2 seconds
  • Avg vs P50 5-minute Latency
  • P50 for components before response
  • P50 for components after response
  • domContentLoaded per browser
  • DOM Content Loaded domLoadingToDomContentLoaded = domContentLoadedEventStart - domLoading Influencing Backend Front-end Network Server Browser Factor Application ApplicationDOMContent ✓ ✓ ✓Loaded
  • Root Cause: Content Change Date Press Release Title Updated Amazon Cloud Player Includes New Scan7/31/2012 and Match Technology, Free Audio Quality Upgrades, and More Amazon.com Announces Second Quarter Sales7/26/2012 up 29% to $12.83 Billion Amazon Launches Innovative New Education Initiative, Paying 95% of Tuition Costs for7/23/2012 Employees to Pursue Their Aspirations – Whether at Amazon, or in Another Industry Amazon.com Books Editors Announce the Big Fall7/23/2012 Books Preview On Prime Instant Video First: Amazon Announces Digital Video License Agreement with Warner7/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 20127/12/2012 Financial Results Conference Call
  • Example Latency Root Causes
  • A/B Latency Testing
  • 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
  • Q&A “Premature optimization is the root of all evil.” – Donald Knuth