appsphere 15 - how your monitoring strategy needs to evolve for single page apps

34
How your monitoring strategy needs to evolve for Single Page Apps Ian Withrow – Group Product Manager End User Monitoring

Upload: appdynamics

Post on 22-Mar-2017

265 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

How your monitoring strategy needs to evolve for Single Page Apps Ian Withrow – Group Product Manager End User Monitoring

Page 2: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

What Are Single Page Applications?

Copyright © 2015 AppDynamics. All rights reserved. 2

. . . All necessary code – HTML, JavaScript, and CSS – is retrieved with a single page load

…or the appropriate resources are dynamically loaded and added to the page as necessary

. . . can provide the perception and navigability of separate logical pages in the application

Source: Randen Pederson (eye), (flickr)

Page 3: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Traditional Web Page vs. SPA Architectures

Copyright © 2015 AppDynamics. All rights reserved. 3

Traditional SPA

http://www.slideshare.net/NishantKumar162/comparative-analysis-of-java-script-framework

Page 4: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

SPA Example: USA Today

Copyright © 2014 AppDynamics. All rights reserved. 4

Page 5: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

SPA can deliver more dynamic & faster apps

Copyright © 2015 AppDynamics. All rights reserved. 5

Source: THOR (flickr)

Page 6: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Shift code onto clients

Copyright © 2015 AppDynamics. All rights reserved. 6

Source: Neil Kremer, (flickr)

Page 7: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

iPhone processing power over generations

Copyright © 2015 AppDynamics. All rights reserved. 7

Source: http://powerboard.basemark.com/compare?devices=206,2606,9310

Page 8: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

SPAs can send less data – good for wireless

Copyright © 2015 AppDynamics. All rights reserved. 8

Source: brett jordan, (flickr)

Page 9: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

The skill set is available

0 100000 200000 300000 400000 500000 600000

JavaScript

Java

.Net

Resume hits on Indeed

Copyright © 2015 AppDynamics. All rights reserved. 9

Page 10: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Some popular SPA Frameworks

Copyright © 2015 AppDynamics. All rights reserved. 10

Page 11: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Some key differences between frameworks

Copyright © 2015 AppDynamics. All rights reserved. 11

http://www.developereconomics.com/feature-comparison-of-4-popular-js-mv-frameworks/

Page 12: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps
Page 13: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Things to watch out with SPA: Page bloat

•  AngularJS 39.5kb •  Backbone.js 43.5kb •  Ember.js 136.2kb

•  Critical path should be <= 14k (one RTT)

•  So first page load will likely be slower

Copyright © 2015 AppDynamics. All rights reserved. 13

Source: yukariryu, (flickr)

Page 14: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Wouldn’t it be great if there were performance monitoring tools for SPA?

Copyright © 2015 AppDynamics. All rights reserved. 14

Page 15: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

The traditional model for performance tools

•  pageview = user experience

•  This is pretty much industry standard for everyone

•  This worked because page load data was easy to get and reasonably relevant

Copyright © 2015 AppDynamics. All rights reserved. 15

Page 16: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Unfortunately SPAs don’t load pages

Copyright © 2015 AppDynamics. All rights reserved. 16

Source: magic4walls

Page 17: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

SPA monitoring version 1

•  The industry’s first attempt was this: –  Monitor Ajax performance –  Take really long browser

snapshots

•  While these features had their own inherent value…

Copyright © 2015 AppDynamics. All rights reserved. 17

Source: Chris Bastian, (flickr)

Page 18: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Users were not impressed

Copyright © 2015 AppDynamics. All rights reserved. 18

Page 19: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

We need a new model

•  A good model: Measures what users actually see

•  What we need is this:

•  Page views = user experience

Copyright © 2015 AppDynamics. All rights reserved. 19

Page 20: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Everything old is new again

Copyright © 2015 AppDynamics. All rights reserved. 20

Page 21: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

AppDynamics model for virtual page experience

It’s a hierarchy

•  Virtual page = view = user experience

•  Ajax = the data layer

•  Eventually can do things like page components

Copyright © 2015 AppDynamics. All rights reserved. 21

Source: Hans Splinter, (flickr)

Page 22: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Ajax as the data layer raises on interesting contradiction •  AJAX literally stands for “Asyncronous JavaScript and

XML”

•  However these requests can often be effectively synchronous from the view’s perspective.

•  Ajax is being used in a way not intended

Copyright © 2015 AppDynamics. All rights reserved. 22

Page 23: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Progress to as of 4.1.x with this model

•  Automatic Detection of Angular JS •  uirouter and ngrouter •  A route update = view

•  Naming rules treat virtual pages the same as pages

•  Associate concurrent Ajax requests based on time

Copyright © 2015 AppDynamics. All rights reserved. 23

Page 24: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

SPA Monitoring Virtual Page Waterfall

Copyright © 2015 AppDynamics. All rights reserved. 24

Related Ajax associated

Page 25: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Growth in SPA framework usage is accelerating

Copyright © 2014 AppDynamics. All rights reserved. 25

Source: Builtwith.com

Page 26: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

What about everyone else?

Copyright © 2015 AppDynamics. All rights reserved. 26

Page 27: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Manual API in 4.2

Report own virtual page timings regardless of framework (or lack thereof)

Copyright © 2015 AppDynamics. All rights reserved. 27

Page 28: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Wine details code example

Copyright © 2015 AppDynamics. All rights reserved. 28

Page 29: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Tricky issue: Which Ajax should be related?!

•  Examples: –  Keep-alives –  Concurrent virtual page

loads

•  Two solutions: –  Exclude/include rules –  Manual association

Copyright © 2015 AppDynamics. All rights reserved. 29

Source: Diego David Garcia, (flickr)

Page 30: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Exclude example

Copyright © 2015 AppDynamics. All rights reserved. 30

Page 31: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Manual association example

Copyright © 2015 AppDynamics. All rights reserved. 31

Page 32: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

In sum: With the new virtual pages capability you can…

Setup health rules, policies, & actions

See the underlying network calls

Treat as a page in sessions

Copyright © 2015 AppDynamics. All rights reserved. 32

Source: Sascha (cable) ,Andrew aka Aushiker (beer), (flickr)

Page 33: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Copyright © 2015 AppDynamics. All rights reserved. 33

Page 34: AppSphere 15 - How Your Monitoring Strategy Needs to Evolve for Single Page Apps

Text example

Lead-in sentence goes in this spot. Arial font, no period at the end •  First level demotion has a round bullet

–  Second level demotion has a standard en-dash •  All demotion levels should use the same font size

Copyright © 2015 AppDynamics. All rights reserved. 34

Note: Slide titles are in sentence case -  NOT IN UPPERCASE -  Not In Title Caps

Note: Page numbers should appear on every page with limited exception