Everyone in the performance community is trying to better understand RUM and how to use it. In this presentation I'll introduce, compare, and contrast the two primary methods of performance monitoring. This will be done by using Synthetic and Real User Measurement side by side for 3 months and aggregating and presenting the data that the two methods yield.
5. Synthetic Overview
- Often in controlled environments
- Reliable bandwidth
- Fixed specs
- Dedicated hardware
Friday, June 28, 13
6. Synthetic Overview
- Generally in several geographic locations
- Offer various browsers / rendering engines
Friday, June 28, 13
7. Synthetic - How It Works
Provider Your Website
Cloud Agent
Friday, June 28, 13
8. Synthetic - How It Works
Provider Your Website
Tell provider to run a test
Friday, June 28, 13
9. Synthetic - How It Works
Provider Your Website
Provider sends the test to an agent
Friday, June 28, 13
10. Synthetic - How It Works
Provider Your Website
The agent requests your website
Friday, June 28, 13
11. Synthetic - How It Works
Provider Your Website
The agent receives the page and renders the response
while measuring load times
Friday, June 28, 13
12. Synthetic - How It Works
Provider Your Website
The results are sent back to the provider to be viewed
and possibly aggregated with other results
Friday, June 28, 13
13. Synthetic - What kind of data do we get?
Source: http://www.webpagetest.org/
Friday, June 28, 13
14. Synthetic - What kind of data do we get?
Source: http://www.webpagetest.org/
Friday, June 28, 13
15. Synthetic - What kind of data do we get?
Source: http://www.webpagetest.org/
Friday, June 28, 13
16. Synthetic - What kind of data do we get?
Source: http://www.webpagetest.org/
Friday, June 28, 13
17. Synthetic - What kind of data do we get?
Source: http://www.webpagetest.org/
Friday, June 28, 13
18. Synthetic - What kind of data do we get?
Source: http://www.webpagetest.org/
Friday, June 28, 13
20. RUM Overview
- Add JavaScript to the page
- Gather timing data from the browser
<script type='text/javascript'>var TBRUM=TBRUM||{};TBRUM.q=TBRUM.q||
[];TBRUM.q.push(['mark','firstbyte',(new Date).getTime()]);</script>
Friday, June 28, 13
21. RUM Overview
- Every page and every visitor
- Actual visitor timings
Friday, June 28, 13
22. RUM Overview
- Covers every device and browser that visits your site
Friday, June 28, 13
23. RUM - How It Works
Your Website
JavaScript
Beacon
Aggregation /
Processing
SiteVisitor
Friday, June 28, 13
24. RUM - How It Works
Your Website
JavaScript
Beacon
Aggregation /
Processing
SiteVisitor
The site visitor decides to come to your site
Friday, June 28, 13
25. RUM - How It Works
Your Website
JavaScript
Beacon
Aggregation /
Processing
SiteVisitor
They request your page and view it as normal
Friday, June 28, 13
26. RUM - How It Works
Your Website
JavaScript
Beacon
Aggregation /
Processing
SiteVisitor
The page includes the RUM Javascript, which collects
timing data from the browser
SiteVisitor
Friday, June 28, 13
27. RUM - How It Works
Your Website
JavaScript
Beacon
Aggregation /
Processing
SiteVisitor
The timing data is then sent to the collection service
via a beacon image request
SiteVisitor
Friday, June 28, 13
28. RUM - How It Works
Your Website
JavaScript
Beacon
Aggregation /
Processing
SiteVisitor
The data is then aggregated and processed to
generate pretty charts and graphs
SiteVisitor
Friday, June 28, 13
29. RUM - Navigation Timing Spec
Source: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
Friday, June 28, 13
30. RUM - Navigation Timing Availability
Source: http://caniuse.com/nav-timing
Friday, June 28, 13
31. RUM - Other Timing Methods
- GoogleToolbar
Source: http://www.google.com/toolbar/ie/index.html
Friday, June 28, 13
32. RUM - Other Timing Methods
- Page unload cookie
Friday, June 28, 13
33. RUM - Other Timing Methods
- Start of document timer
Friday, June 28, 13
34. RUM - Other Data
- Estimated Bandwidth
- IP Address
- URL
- Referer
- Cookies
- Local Storage support
- Number of images, JavaScript, CSS, etc
- User actions on the page
- Memory Usage (very limited availability)
- Anything else you can get from JavaScript!
Friday, June 28, 13
35. RUM - Resource Timing Spec
Source: http://www.w3.org/TR/resource-timing/
Friday, June 28, 13
36. State of Resource Timing Spec
- IE10, Chrome, Chrome Mobile
-Various degrees of support / compatibility
- Same origin policy by default
- Override withTiming-Allow-Origin HTTP response header
Friday, June 28, 13
37. RUM - What kind of data do we get?
Friday, June 28, 13
38. RUM - What kind of data do we get?
Friday, June 28, 13
39. RUM - What kind of data do we get?
Friday, June 28, 13
40. RUM - What kind of data do we get?
Friday, June 28, 13
42. Methodology
Ran both on velocityconf.com
Torbit used for RUM
Webpagetest for Synthetic
Approximately 3 months (3/18/13 - 6/14/13)
Friday, June 28, 13
43. Methodology
Synthetic hit the following URLs once an hour:
http://velocityconf.com/velocity2013/
http://velocityconf.com/velocity2013/public/schedule/topic/935
http://velocityconf.com/velocity2013/public/content/exhibitors
http://velocityconf.com/velocity2013/public/schedule/grid
http://velocityconf.com/velocity2013/public/content/about
http://velocityconf.com/velocity2013/public/schedule/speakers
Friday, June 28, 13
44. Methodology
From the following synthetic agents:
Dulles
- Chrome
- IE8
- IE9
- IE10
- Firefox
- Safari
Chicago
- Chrome
San Jose
- IE9
Los Angeles
- Chrome
Dublin
- IE8
Sao Paulo
- IE8
Toronto
- IE8
Amsterdam
- IE9
- Chrome
Frankfurt
- IE9
- Firefox
Moscow
- Chrome
- IE8
Stockholm
- Safari
Delhi
- IE8
China
- IE 8
Tokyo
- IE 8
Sydney
- Chrome
Friday, June 28, 13
55. When To Use?
When should you use one over the other?
Friday, June 28, 13
56. When to use Synthetic
- Pre-production
- Low / no traffic pages
- Going deep on a problem
- Critical pages and paths
- Monitoring competitors
Friday, June 28, 13
57. When to use RUM
- Ultimate source of truth
- Finding out you have a problem
- Monitoring trends over time
-Vendor or departmental SLAs
Friday, June 28, 13
58. Build or Buy? - Synthetic
Should you build it yourself or buy a solution?
Friday, June 28, 13