velocity 2013 - rum vs synthetic

74
Jon Fox @jfox85 Performance Monitoring: Synthetic vs RUM Velocity 2013 Friday, June 28, 13

Upload: jfox85

Post on 27-Jan-2015

111 views

Category:

Technology


1 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Velocity 2013 - Rum vs Synthetic

Jon Fox@jfox85

Performance Monitoring:

Synthetic vs

RUM

Velocity 2013Friday, June 28, 13

Page 2: Velocity 2013 - Rum vs Synthetic

Performance Monitoring

Friday, June 28, 13

Page 3: Velocity 2013 - Rum vs Synthetic

Performance Monitoring

Two primary methods:

- Synthetic (Active)

- Real User Measurement - RUM (Passive)

Friday, June 28, 13

Page 4: Velocity 2013 - Rum vs Synthetic

Synthetic Overview

- Browser in the cloud

- Usually has extra instrumentation

Friday, June 28, 13

Page 5: Velocity 2013 - Rum vs Synthetic

Synthetic Overview

- Often in controlled environments - Reliable bandwidth - Fixed specs - Dedicated hardware

Friday, June 28, 13

Page 6: Velocity 2013 - Rum vs Synthetic

Synthetic Overview

- Generally in several geographic locations

- Offer various browsers / rendering engines

Friday, June 28, 13

Page 7: Velocity 2013 - Rum vs Synthetic

Synthetic - How It Works

Provider Your Website

Cloud Agent

Friday, June 28, 13

Page 8: Velocity 2013 - Rum vs Synthetic

Synthetic - How It Works

Provider Your Website

Tell provider to run a test

Friday, June 28, 13

Page 9: Velocity 2013 - Rum vs Synthetic

Synthetic - How It Works

Provider Your Website

Provider sends the test to an agent

Friday, June 28, 13

Page 10: Velocity 2013 - Rum vs Synthetic

Synthetic - How It Works

Provider Your Website

The agent requests your website

Friday, June 28, 13

Page 11: Velocity 2013 - Rum vs Synthetic

Synthetic - How It Works

Provider Your Website

The agent receives the page and renders the responsewhile measuring load times

Friday, June 28, 13

Page 12: Velocity 2013 - Rum vs Synthetic

Synthetic - How It Works

Provider Your Website

The results are sent back to the provider to be viewedand possibly aggregated with other results

Friday, June 28, 13

Page 13: Velocity 2013 - Rum vs Synthetic

Synthetic - What kind of data do we get?

Source: http://www.webpagetest.org/

Friday, June 28, 13

Page 14: Velocity 2013 - Rum vs Synthetic

Synthetic - What kind of data do we get?

Source: http://www.webpagetest.org/

Friday, June 28, 13

Page 15: Velocity 2013 - Rum vs Synthetic

Synthetic - What kind of data do we get?

Source: http://www.webpagetest.org/

Friday, June 28, 13

Page 16: Velocity 2013 - Rum vs Synthetic

Synthetic - What kind of data do we get?

Source: http://www.webpagetest.org/

Friday, June 28, 13

Page 17: Velocity 2013 - Rum vs Synthetic

Synthetic - What kind of data do we get?

Source: http://www.webpagetest.org/

Friday, June 28, 13

Page 18: Velocity 2013 - Rum vs Synthetic

Synthetic - What kind of data do we get?

Source: http://www.webpagetest.org/

Friday, June 28, 13

Page 19: Velocity 2013 - Rum vs Synthetic

Real User Measurement (RUM)

On the other hand we have RUM

Friday, June 28, 13

Page 20: Velocity 2013 - Rum vs Synthetic

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

Page 21: Velocity 2013 - Rum vs Synthetic

RUM Overview

- Every page and every visitor

- Actual visitor timings

Friday, June 28, 13

Page 22: Velocity 2013 - Rum vs Synthetic

RUM Overview

- Covers every device and browser that visits your site

Friday, June 28, 13

Page 23: Velocity 2013 - Rum vs Synthetic

RUM - How It Works

Your Website

JavaScript

Beacon Aggregation /Processing

Site Visitor

Friday, June 28, 13

Page 24: Velocity 2013 - Rum vs Synthetic

RUM - How It Works

Your Website

JavaScript

Beacon Aggregation /Processing

Site Visitor

The site visitor decides to come to your site

Friday, June 28, 13

Page 25: Velocity 2013 - Rum vs Synthetic

RUM - How It Works

Your Website

JavaScript

Beacon Aggregation /Processing

Site Visitor

They request your page and view it as normal

Friday, June 28, 13

Page 26: Velocity 2013 - Rum vs Synthetic

RUM - How It Works

Your Website

JavaScript

Beacon Aggregation /Processing

Site Visitor

The page includes the RUM Javascript, which collects timing data from the browser

Site Visitor

Friday, June 28, 13

Page 27: Velocity 2013 - Rum vs Synthetic

RUM - How It Works

Your Website

JavaScript

Beacon Aggregation /Processing

Site Visitor

The timing data is then sent to the collection service via a beacon image request

Site Visitor

Friday, June 28, 13

Page 28: Velocity 2013 - Rum vs Synthetic

RUM - How It Works

Your Website

JavaScript

Beacon Aggregation /Processing

Site Visitor

The data is then aggregated and processed to generate pretty charts and graphs

Site Visitor

Friday, June 28, 13

Page 29: Velocity 2013 - Rum vs Synthetic

RUM - Navigation Timing Spec

Source: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html

Friday, June 28, 13

Page 30: Velocity 2013 - Rum vs Synthetic

RUM - Navigation Timing Availability

Source: http://caniuse.com/nav-timing

Friday, June 28, 13

Page 31: Velocity 2013 - Rum vs Synthetic

RUM - Other Timing Methods

- Google Toolbar

Source: http://www.google.com/toolbar/ie/index.html

Friday, June 28, 13

Page 32: Velocity 2013 - Rum vs Synthetic

RUM - Other Timing Methods

- Page unload cookie

Friday, June 28, 13

Page 33: Velocity 2013 - Rum vs Synthetic

RUM - Other Timing Methods

- Start of document timer

Friday, June 28, 13

Page 34: Velocity 2013 - Rum vs Synthetic

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

Page 35: Velocity 2013 - Rum vs Synthetic

RUM - Resource Timing Spec

Source: http://www.w3.org/TR/resource-timing/

Friday, June 28, 13

Page 36: Velocity 2013 - Rum vs Synthetic

State of Resource Timing Spec

- IE10, Chrome, Chrome Mobile

- Various degrees of support / compatibility

- Same origin policy by default

- Override with Timing-Allow-Origin HTTP response header

Friday, June 28, 13

Page 37: Velocity 2013 - Rum vs Synthetic

RUM - What kind of data do we get?

Friday, June 28, 13

Page 38: Velocity 2013 - Rum vs Synthetic

RUM - What kind of data do we get?

Friday, June 28, 13

Page 39: Velocity 2013 - Rum vs Synthetic

RUM - What kind of data do we get?

Friday, June 28, 13

Page 40: Velocity 2013 - Rum vs Synthetic

RUM - What kind of data do we get?

Friday, June 28, 13

Page 41: Velocity 2013 - Rum vs Synthetic

Comparison

So how do these methods compare?

Friday, June 28, 13

Page 42: Velocity 2013 - Rum vs Synthetic

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

Page 43: Velocity 2013 - Rum vs Synthetic

Methodology

Synthetic hit the following URLs once an hour:

http://velocityconf.com/velocity2013/http://velocityconf.com/velocity2013/public/schedule/topic/935http://velocityconf.com/velocity2013/public/content/exhibitorshttp://velocityconf.com/velocity2013/public/schedule/gridhttp://velocityconf.com/velocity2013/public/content/abouthttp://velocityconf.com/velocity2013/public/schedule/speakers

Friday, June 28, 13

Page 44: Velocity 2013 - Rum vs Synthetic

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

Page 45: Velocity 2013 - Rum vs Synthetic

Methodology

Real User Measurement:

RUM was run on every page (as far as I know)

Friday, June 28, 13

Page 46: Velocity 2013 - Rum vs Synthetic

Results - Data Overview

Synthetic Load Times

RUM Load Times

Friday, June 28, 13

Page 47: Velocity 2013 - Rum vs Synthetic

Results - Data Overview

Synthetic Load Times

RUM Load Times

Friday, June 28, 13

Page 48: Velocity 2013 - Rum vs Synthetic

Results - Browser Coverage

Synthetic RUM

- Chrome - IE 10 - IE 9 - IE 8 - Firefox - Safari

- Chrome - IE 10 - IE 9 - IE 8 - IE 7 - Firefox - Safari - Opera - Android - iPhone - And more...

Friday, June 28, 13

Page 49: Velocity 2013 - Rum vs Synthetic

Results - Geographic Coverage

Synthetic:

Friday, June 28, 13

Page 50: Velocity 2013 - Rum vs Synthetic

Results - Geographic Coverage

RUM:

Friday, June 28, 13

Page 51: Velocity 2013 - Rum vs Synthetic

Results - Data Insights

RUM:

Synthetic:

0"5"10"15"20"25"30"35"40"45"50"

1" 2" 3" 4" 5" 6" 7" 8" 9" 10" 11" 12" 13" 14" 15" 16" 17" 18" 19" 20" 21" 22" 23" 24"

Load

%Tim

e%(sec)%

Time%(hrs)%

RUM"Avg"

90th"

Syn"Avg"

Friday, June 28, 13

Page 52: Velocity 2013 - Rum vs Synthetic

Results - Data Insights

0"1"2"3"4"5"6"7"8"9"10"

1" 2" 3" 4" 5" 6" 7" 8" 9" 10" 11" 12" 13" 14" 15" 16" 17" 18" 19" 20" 21" 22" 23" 24" 25" 26" 27" 28" 29"

Load

%Tim

es%(sec)%

Time%(hrs)%

RUM"Avg"

RUM"90th"

Syn"Avg"

0"

200"

400"

600"

800"

1000"

1200"

1" 2" 3" 4" 5" 6" 7" 8" 9" 10" 11" 12" 13" 14" 15" 16" 17" 18" 19" 20" 21" 22" 23" 24" 25" 26" 27" 28" 29"

Pageview

s%

Pageviews"

Friday, June 28, 13

Page 53: Velocity 2013 - Rum vs Synthetic

Results - Data Insights

Friday, June 28, 13

Page 54: Velocity 2013 - Rum vs Synthetic

Results - Data Insights

Friday, June 28, 13

Page 55: Velocity 2013 - Rum vs Synthetic

When To Use?

When should you use one over the other?

Friday, June 28, 13

Page 56: Velocity 2013 - Rum vs Synthetic

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

Page 57: Velocity 2013 - Rum vs Synthetic

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

Page 58: Velocity 2013 - Rum vs Synthetic

Build or Buy? - Synthetic

Should you build it yourself or buy a solution?

Friday, June 28, 13

Page 59: Velocity 2013 - Rum vs Synthetic

Build - Synthetic

Open source

Self-host options

Friday, June 28, 13

Page 60: Velocity 2013 - Rum vs Synthetic

Reasons to Buy - Synthetic

Need lots of agents

Friday, June 28, 13

Page 61: Velocity 2013 - Rum vs Synthetic

Reasons to Buy - Synthetic

Need lots of locations

Friday, June 28, 13

Page 62: Velocity 2013 - Rum vs Synthetic

Reasons to Buy - Synthetic

Simpler aggregation and reporting

Friday, June 28, 13

Page 63: Velocity 2013 - Rum vs Synthetic

Build or Buy? - RUM

What about building your own RUM?

Friday, June 28, 13

Page 64: Velocity 2013 - Rum vs Synthetic

Build - RUM

Collection is pretty easy...

Episodes - Steve Soudershttp://stevesouders.com/episodes/

Boomerang - Philip Tellishttps://github.com/lognormal/boomerang

Friday, June 28, 13

Page 65: Velocity 2013 - Rum vs Synthetic

Reasons to Buy - RUM

Storage and processing are hard...

Friday, June 28, 13

Page 66: Velocity 2013 - Rum vs Synthetic

Reasons to Buy - RUM

Dealing with outliers & bad data

Friday, June 28, 13

Page 67: Velocity 2013 - Rum vs Synthetic

Conclusions

So which method should you use?

Friday, June 28, 13

Page 68: Velocity 2013 - Rum vs Synthetic

Conclusions

A mix of both is best

Friday, June 28, 13

Page 69: Velocity 2013 - Rum vs Synthetic

Why do we care?

And in case you need a reminder...

Friday, June 28, 13

Page 70: Velocity 2013 - Rum vs Synthetic

Performance Matters

Aggregated data from 1,000+ Torbit Sites

Friday, June 28, 13

Page 71: Velocity 2013 - Rum vs Synthetic

Performance Matters

Aggregated data from 1,000+ Torbit Sites

Friday, June 28, 13

Page 72: Velocity 2013 - Rum vs Synthetic

Conclusions

Free options are available:

Synthetic RUM

Friday, June 28, 13

Page 73: Velocity 2013 - Rum vs Synthetic

Conclusions

Start collecting data now!

Friday, June 28, 13

Page 74: Velocity 2013 - Rum vs Synthetic

Questions?

Jon [email protected]

@jfox85

Friday, June 28, 13