Frontend SPOF

Patrick Meenan
Patrick MeenanSoftware Engineer um Facebook
Frontend SPOF
Patrick Meenan




                 Google Confidential and Proprietary
Credit where credit is due

                   June 2010 - Steve Souders

    http://www.stevesouders.com/blog/2010/06/01/frontend-spof/




                                                         Google Confidential and Proprietary
See what it looks like: http://youtu.be/prToLDpjmPw




                                              Google Confidential and Proprietary
All Because of...
<script src="https://platform.twitter.com/anywhere.js?id=ZV0JHq7YJkjozsfohDIleQ&v=1" type="text/javascript"
></script>




                                                                                                   Google Confidential and Proprietary
What Monitoring Says...
Active Monitoring
    ○ Server Monitoring
      ✔ Base page responded in 1.5 Seconds
   ○ Full-Browser Monitoring
      ✔ Page loaded in 29 Seconds (test timeout is 60)


Real-User Reporting
   ○ Analytics Page Views
      ✔ Analytics loaded and executed asynchronously
   ○ RUM Performance
      ✔ If user bailed before onload there is no performance data




                                                             Google Confidential and Proprietary
It Gets Worse!
Windows Socket Connect Timeout: 20s

Mac/Linux Socket Connect Timeout: Much Higher

                 PER CONNECTION




                                            Google Confidential and Proprietary
There's More!
On that one page, all before the main content:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>


<script type="text/javascript" src="http://scripts.verticalacuity.com/vat/mon/vt.js?1329448814"></script>


<script type="text/javascript" src="http://cdn.sailthru.com/scout/v1.js?1329448814"></script>


<script type="text/javascript" src="//cdn.optimizely.com/js/20728634.js?1329448814"></script>


<script src="https://platform.twitter.com/anywhere.js?..." type="text/javascript"></script>




                                                                                              Google Confidential and Proprietary
But I'd notice it is down...




                           Google Confidential and Proprietary
In Iran?




                                                                                                                  Google Confidential and Proprietary
https://blogs.akamai.com/2012/02/a-view-of-the-iranian-internet-blockade-from-akamais-intelligent-platform.html
or China?




                                                                Google Confidential and Proprietary
http://calendar.perfplanet.com/2011/frontend-spof-in-beijing/
We have solutions...




                       Google Confidential and Proprietary
Async Snippet
Good for code with no dependencies (widgets):




                                                Google Confidential and Proprietary
Async Loaders
Help for chaining together dependencies

Control.js
     ○   http://stevesouders.com/controljs/
LABjs
     ○   http://labjs.com/



● Remember to load the loader safely

● Requires a fair bit of manual work



                                              Google Confidential and Proprietary
Put scripts at the bottom




                                                      Google Confidential and Proprietary
http://stevesouders.com/examples/rule-js-bottom.php
Well...




          Google Confidential and Proprietary
Almost...




                                                                      Blocks onload except on IE and iOS 4




                                                                                                Google Confidential and Proprietary
http://www.stevesouders.com/blog/2012/01/13/javascript-performance/
So, How are we doing?




                        Google Confidential and Proprietary
Widgets
Google Analytics: Async
Google +1: Async
Twitter: Async
Facebook: Async
Delicious: Async (image/href)
StumbleUpon: Async
Digg: Async
Reditt: Blocking
AddThis: Blocking
ShareThis: Blocking

(as of February 2012)
                                Google Confidential and Proprietary
Code Libraries (samples)
Jquery: Blocking in the head
Closure Library: Blocking in the head
YUI: Blocking
Dojo: Blocking in the head
Moo Tools: Blocking in the head
Google API's: Blocking (default, Async available in docs)




                                                 Google Confidential and Proprietary
Popular CMS's

Wordpress: Blocking in the head

Drupal: Blocking in the head

Joomla: Blocking in the head




                                  Google Confidential and Proprietary
Testing for Frontend SPOF




                       Google Confidential and Proprietary
Routing to localhost

Fails FAST! (connections are rejected)

Not good for testing real failure scenarios




                                              Google Confidential and Proprietary
You need a black hole
                          blackhole.webpagetest.org                           72.66.115.13




   Hosts File                                                          On WebPagetest
                                                                       setDnsName ajax.googleapis.com blackhole.webpagetest.org
   72.66.115.13 ajax.googleapis.com                                    setDnsName apis.google.com blackhole.webpagetest.org
   72.66.115.13 apis.google.com                                        setDnsName www.google-analytics.com blackhole.webpagetest.org
   72.66.115.13 www.google-analytics.com                               setDnsName connect.facebook.net blackhole.webpagetest.org
                                                                       setDnsName platform.twitter.com blackhole.webpagetest.org
   72.66.115.13 connect.facebook.net                                   ...
   72.66.115.13 platform.twitter.com                                   navigate your.url.com
   ...


                                                                                                           Google Confidential and Proprietary
http://blog.patrickmeenan.com/2011/10/testing-for-frontend-spof.html            http://www.jpl.nasa.go/spaceimages/details.php?id=PIA13168
How pervasive is the problem?




                          Google Confidential and Proprietary
"Broken" Sites
●   CNN
●   MSNBC
●   New York Times
●   LA Times
●   Bloomberg
●   ABC News
●   CNet news.com
●   Pinterest
●   ESPN
●   AARP
●   Business Insider

...From just 20 minutes of looking
                                     Google Confidential and Proprietary
What do we need to do?




                         Google Confidential and Proprietary
Browsers
● Provide an easier way to asynchronously load complex
  dependency chains
  ○ async does not maintain order
  ○ defer does not work for inline scripts
     ■ and is broken in several versions of IE

● Not block onload for Async scripts
  ○ Sadly, the spec requires onload blocking

● Implement Resource Timing



                                               Google Confidential and Proprietary
Widget Owners
● Never EVER provide blocking snippets

● All examples should be asynchronous

● Do not force HTTPS if it isn't required

● Where possible, allow for sites to self-host any critical
  code




                                                   Google Confidential and Proprietary
CMS Developers
● Build frameworks that encourage async code loading
  (and encourage their use for default operation)

● Provide a mechanism for tracking the performance of
  individual plugins




                                              Google Confidential and Proprietary
Site Owners
●   Never load resources that you do not control synchronously (and refuse
    3rd party code that doesn't have an async option)

●   Do not rely on onload for important functionality


●   Make sure your monitoring has aggressive time limits (under 20 seconds)


●   Make sure your RUM reporting has an aggressive timeout


●   Track RUM failures by region


●   Leverage Resource Timing and field RUM analytics when available




                                                               Google Confidential and Proprietary
1 von 30

Recomendados

Cache is King von
Cache is KingCache is King
Cache is KingSteve Souders
6.6K views70 Folien
High Performance Snippets von
High Performance SnippetsHigh Performance Snippets
High Performance SnippetsSteve Souders
5.9K views33 Folien
Your Script Just Killed My Site von
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My SiteSteve Souders
10.5K views30 Folien
Measuring Web Performance (HighEdWeb FL Edition) von
Measuring Web Performance (HighEdWeb FL Edition)Measuring Web Performance (HighEdWeb FL Edition)
Measuring Web Performance (HighEdWeb FL Edition)Dave Olsen
3.2K views68 Folien
High Performance JavaScript (Amazon DevCon 2011) von
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)Nicholas Zakas
4.6K views155 Folien
State of the resource timing api von
State of the resource timing apiState of the resource timing api
State of the resource timing apiAaron Peters
4.7K views21 Folien

Más contenido relacionado

Was ist angesagt?

Prebrowsing - Velocity NY 2013 von
Prebrowsing - Velocity NY 2013Prebrowsing - Velocity NY 2013
Prebrowsing - Velocity NY 2013Steve Souders
4.3K views60 Folien
Progressive Enhancement 2.0 (Conference Agnostic) von
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)Nicholas Zakas
42.5K views125 Folien
@media - Even Faster Web Sites von
@media - Even Faster Web Sites@media - Even Faster Web Sites
@media - Even Faster Web SitesSteve Souders
11.5K views50 Folien
Web 2.0 Expo: Even Faster Web Sites von
Web 2.0 Expo: Even Faster Web SitesWeb 2.0 Expo: Even Faster Web Sites
Web 2.0 Expo: Even Faster Web SitesSteve Souders
6.6K views34 Folien
Browser Wars Episode 1: The Phantom Menace von
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom MenaceNicholas Zakas
77.4K views168 Folien
High Performance HTML5 (SF HTML5 UG) von
High Performance HTML5 (SF HTML5 UG)High Performance HTML5 (SF HTML5 UG)
High Performance HTML5 (SF HTML5 UG)Steve Souders
15.3K views43 Folien

Was ist angesagt?(20)

Prebrowsing - Velocity NY 2013 von Steve Souders
Prebrowsing - Velocity NY 2013Prebrowsing - Velocity NY 2013
Prebrowsing - Velocity NY 2013
Steve Souders4.3K views
Progressive Enhancement 2.0 (Conference Agnostic) von Nicholas Zakas
Progressive Enhancement 2.0 (Conference Agnostic)Progressive Enhancement 2.0 (Conference Agnostic)
Progressive Enhancement 2.0 (Conference Agnostic)
Nicholas Zakas42.5K views
@media - Even Faster Web Sites von Steve Souders
@media - Even Faster Web Sites@media - Even Faster Web Sites
@media - Even Faster Web Sites
Steve Souders11.5K views
Web 2.0 Expo: Even Faster Web Sites von Steve Souders
Web 2.0 Expo: Even Faster Web SitesWeb 2.0 Expo: Even Faster Web Sites
Web 2.0 Expo: Even Faster Web Sites
Steve Souders6.6K views
Browser Wars Episode 1: The Phantom Menace von Nicholas Zakas
Browser Wars Episode 1: The Phantom MenaceBrowser Wars Episode 1: The Phantom Menace
Browser Wars Episode 1: The Phantom Menace
Nicholas Zakas77.4K views
High Performance HTML5 (SF HTML5 UG) von Steve Souders
High Performance HTML5 (SF HTML5 UG)High Performance HTML5 (SF HTML5 UG)
High Performance HTML5 (SF HTML5 UG)
Steve Souders15.3K views
Front End Development for Back End Java Developers - Jfokus 2020 von Matt Raible
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
Matt Raible181 views
[jqconatx] Adaptive Images for Responsive Web Design von Christopher Schmitt
[jqconatx] Adaptive Images for Responsive Web Design[jqconatx] Adaptive Images for Responsive Web Design
[jqconatx] Adaptive Images for Responsive Web Design
Christopher Schmitt31.4K views
Performance on the Yahoo! Homepage von Nicholas Zakas
Performance on the Yahoo! HomepagePerformance on the Yahoo! Homepage
Performance on the Yahoo! Homepage
Nicholas Zakas7.9K views
High Performance JavaScript (YUIConf 2010) von Nicholas Zakas
High Performance JavaScript (YUIConf 2010)High Performance JavaScript (YUIConf 2010)
High Performance JavaScript (YUIConf 2010)
Nicholas Zakas61.8K views
How to investigate and recover from a security breach in WordPress von Otto Kekäläinen
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
implement lighthouse-ci with your web development workflow von WordPress
implement lighthouse-ci with your web development workflowimplement lighthouse-ci with your web development workflow
implement lighthouse-ci with your web development workflow
WordPress113 views
Clojure Web Development von Hong Jiang
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
Hong Jiang1.3K views
Javascript Security - Three main methods of defending your MEAN stack von Ran Bar-Zik
Javascript Security - Three main methods of defending your MEAN stackJavascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stack
Ran Bar-Zik2K views
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat von VMware Hyperic
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache TomcatCase Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
Case Study: Migrating Hyperic from EJB to Spring from JBoss to Apache Tomcat
VMware Hyperic16.4K views
Apache Roller, Acegi Security and Single Sign-on von Matt Raible
Apache Roller, Acegi Security and Single Sign-onApache Roller, Acegi Security and Single Sign-on
Apache Roller, Acegi Security and Single Sign-on
Matt Raible2.2K views
Optimizing your WordPress website von mwfordesigns
Optimizing your WordPress websiteOptimizing your WordPress website
Optimizing your WordPress website
mwfordesigns657 views

Destacado

Front End Tooling and Performance - Codeaholics HK 2015 von
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015Holger Bartel
1.5K views43 Folien
Frontend automation and stability von
Frontend automation and stabilityFrontend automation and stability
Frontend automation and stabilityMáté Nádasdi
2.3K views45 Folien
Sinau Bareng Frontend Web Development @ DiLo Malang von
Sinau Bareng Frontend Web Development @ DiLo MalangSinau Bareng Frontend Web Development @ DiLo Malang
Sinau Bareng Frontend Web Development @ DiLo MalangMoch. Zamroni
1.6K views14 Folien
Webinar: Front End Web Development - Trendy Web Designs Using HTML5 von
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Edureka!
4.5K views31 Folien
User eXperience & Front End Development von
User eXperience & Front End DevelopmentUser eXperience & Front End Development
User eXperience & Front End Developmentandreafallaswork
1.1K views28 Folien
Front end Tips Tricks & Tools von
Front end Tips Tricks & ToolsFront end Tips Tricks & Tools
Front end Tips Tricks & ToolsSandeep Ramgolam
922 views30 Folien

Destacado(20)

Front End Tooling and Performance - Codeaholics HK 2015 von Holger Bartel
Front End Tooling and Performance - Codeaholics HK 2015Front End Tooling and Performance - Codeaholics HK 2015
Front End Tooling and Performance - Codeaholics HK 2015
Holger Bartel1.5K views
Frontend automation and stability von Máté Nádasdi
Frontend automation and stabilityFrontend automation and stability
Frontend automation and stability
Máté Nádasdi2.3K views
Sinau Bareng Frontend Web Development @ DiLo Malang von Moch. Zamroni
Sinau Bareng Frontend Web Development @ DiLo MalangSinau Bareng Frontend Web Development @ DiLo Malang
Sinau Bareng Frontend Web Development @ DiLo Malang
Moch. Zamroni1.6K views
Webinar: Front End Web Development - Trendy Web Designs Using HTML5 von Edureka!
Webinar: Front End Web Development - Trendy Web Designs Using HTML5Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Webinar: Front End Web Development - Trendy Web Designs Using HTML5
Edureka!4.5K views
User eXperience & Front End Development von andreafallaswork
User eXperience & Front End DevelopmentUser eXperience & Front End Development
User eXperience & Front End Development
andreafallaswork1.1K views
Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas von David Amend
Grunt js for the Enterprise Vol.1: Frontend Performance with PhantomasGrunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
Grunt js for the Enterprise Vol.1: Frontend Performance with Phantomas
David Amend2.9K views
建立前端开发团队 (Front-end Development Environment) von Joseph Chiang
建立前端开发团队 (Front-end Development Environment)建立前端开发团队 (Front-end Development Environment)
建立前端开发团队 (Front-end Development Environment)
Joseph Chiang4.1K views
Wrangling Large Scale Frontend Web Applications von Ryan Roemer
Wrangling Large Scale Frontend Web ApplicationsWrangling Large Scale Frontend Web Applications
Wrangling Large Scale Frontend Web Applications
Ryan Roemer48.1K views
A modern front end development workflow for Magnolia at Atlassian von Magnolia
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at Atlassian
Magnolia1.8K views
How to Build Front-End Web Apps that Scale - FutureJS von Phil Leggetter
How to Build Front-End Web Apps that Scale - FutureJSHow to Build Front-End Web Apps that Scale - FutureJS
How to Build Front-End Web Apps that Scale - FutureJS
Phil Leggetter4.4K views
W3 conf hill-html5-security-realities von Brad Hill
W3 conf hill-html5-security-realitiesW3 conf hill-html5-security-realities
W3 conf hill-html5-security-realities
Brad Hill10.4K views
Frontend at Scale - The Tumblr Story von Chris Miller
Frontend at Scale - The Tumblr StoryFrontend at Scale - The Tumblr Story
Frontend at Scale - The Tumblr Story
Chris Miller8.1K views
Modern Frontend Technology von Ship Hsu
Modern Frontend TechnologyModern Frontend Technology
Modern Frontend Technology
Ship Hsu1.5K views
TechTalk #85 : Latest Frontend Technologies von bincangteknologi
TechTalk #85 : Latest Frontend TechnologiesTechTalk #85 : Latest Frontend Technologies
TechTalk #85 : Latest Frontend Technologies
bincangteknologi1.1K views
Front End Development Workflow Tools von Ahmed Elmehri
Front End Development Workflow ToolsFront End Development Workflow Tools
Front End Development Workflow Tools
Ahmed Elmehri723 views
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ... von Prasid Pathak
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
The Frontend Developer Landscape Explained and the Rise of Advanced Frontend ...
Prasid Pathak4.5K views
engage 2015 - Domino App Development - Where should I go now? von René Winkelmeyer
engage 2015 - Domino App Development - Where should I go now?engage 2015 - Domino App Development - Where should I go now?
engage 2015 - Domino App Development - Where should I go now?
René Winkelmeyer761 views

Similar a Frontend SPOF

Preconnect, prefetch, prerender... von
Preconnect, prefetch, prerender...Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...MilanAryal
2.4K views22 Folien
Google I/O 2012 - Protecting your user experience while integrating 3rd party... von
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Patrick Meenan
3K views51 Folien
Grunt.js and Yeoman, Continous Integration von
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
30.8K views63 Folien
20 tips for website performance von
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
103 views61 Folien
Scraping the web with Laravel, Dusk, Docker, and PHP von
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPPaul Redmond
7.8K views81 Folien
Mobile backends with Google Cloud Platform (MBLTDev'14) von
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Natalia Efimtseva
515 views36 Folien

Similar a Frontend SPOF(20)

Preconnect, prefetch, prerender... von MilanAryal
Preconnect, prefetch, prerender...Preconnect, prefetch, prerender...
Preconnect, prefetch, prerender...
MilanAryal2.4K views
Google I/O 2012 - Protecting your user experience while integrating 3rd party... von Patrick Meenan
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Patrick Meenan3K views
Grunt.js and Yeoman, Continous Integration von David Amend
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
David Amend30.8K views
20 tips for website performance von Andrew Siemer
20 tips for website performance20 tips for website performance
20 tips for website performance
Andrew Siemer103 views
Scraping the web with Laravel, Dusk, Docker, and PHP von Paul Redmond
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHP
Paul Redmond7.8K views
Mobile backends with Google Cloud Platform (MBLTDev'14) von Natalia Efimtseva
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)
Natalia Efimtseva515 views
Deep crawl the chaotic landscape of JavaScript von Onely
Deep crawl the chaotic landscape of JavaScript Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript
Onely11.7K views
YouTube Mobile Webapp: On the edge of Html5 von SMART DevNet
YouTube Mobile Webapp: On the edge of Html5YouTube Mobile Webapp: On the edge of Html5
YouTube Mobile Webapp: On the edge of Html5
SMART DevNet3.2K views
OWASP ZAP Workshop for QA Testers von Javan Rasokat
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
Javan Rasokat104.9K views
Detecting headless browsers von Sergey Shekyan
Detecting headless browsersDetecting headless browsers
Detecting headless browsers
Sergey Shekyan25.9K views
Velocity EU 2012 - Third party scripts and you von Patrick Meenan
Velocity EU 2012 - Third party scripts and youVelocity EU 2012 - Third party scripts and you
Velocity EU 2012 - Third party scripts and you
Patrick Meenan2.6K views
Google Chronicles: Analytics And Chrome von Sarah Dutkiewicz
Google Chronicles: Analytics And ChromeGoogle Chronicles: Analytics And Chrome
Google Chronicles: Analytics And Chrome
Sarah Dutkiewicz966 views
Shining a light on performance (js meetup) von Yoav Niran
Shining a light on performance (js meetup)Shining a light on performance (js meetup)
Shining a light on performance (js meetup)
Yoav Niran131 views
Zagat.com Case Study (DrupalCon Denver 2012) von Phase2
Zagat.com Case Study (DrupalCon Denver 2012)Zagat.com Case Study (DrupalCon Denver 2012)
Zagat.com Case Study (DrupalCon Denver 2012)
Phase21.8K views
DevOops & How I hacked you DevopsDays DC June 2015 von Chris Gates
DevOops & How I hacked you DevopsDays DC June 2015DevOops & How I hacked you DevopsDays DC June 2015
DevOops & How I hacked you DevopsDays DC June 2015
Chris Gates3.2K views
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13 von Fred Sauer
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
SF JUG - GWT Can Help You Create Amazing Apps - 2009-10-13
Fred Sauer1.5K views
vodQA Pune (2019) - Browser automation using dev tools von vodQA
vodQA Pune (2019) - Browser automation using dev toolsvodQA Pune (2019) - Browser automation using dev tools
vodQA Pune (2019) - Browser automation using dev tools
vodQA643 views
WebPagetest Power Users - Velocity 2014 von Patrick Meenan
WebPagetest Power Users - Velocity 2014WebPagetest Power Users - Velocity 2014
WebPagetest Power Users - Velocity 2014
Patrick Meenan8.8K views

Más de Patrick Meenan

Resource Prioritization von
Resource PrioritizationResource Prioritization
Resource PrioritizationPatrick Meenan
1.4K views46 Folien
HTTP/2 Prioritization von
HTTP/2 PrioritizationHTTP/2 Prioritization
HTTP/2 PrioritizationPatrick Meenan
3.1K views68 Folien
Getting the most out of WebPageTest von
Getting the most out of WebPageTestGetting the most out of WebPageTest
Getting the most out of WebPageTestPatrick Meenan
2.3K views64 Folien
Http2 in practice von
Http2 in practiceHttp2 in practice
Http2 in practicePatrick Meenan
2.9K views169 Folien
Resource loading, prioritization, HTTP/2 - oh my! von
Resource loading, prioritization, HTTP/2 - oh my!Resource loading, prioritization, HTTP/2 - oh my!
Resource loading, prioritization, HTTP/2 - oh my!Patrick Meenan
1.9K views40 Folien
How fast is it? von
How fast is it?How fast is it?
How fast is it?Patrick Meenan
3.8K views40 Folien

Más de Patrick Meenan(20)

Getting the most out of WebPageTest von Patrick Meenan
Getting the most out of WebPageTestGetting the most out of WebPageTest
Getting the most out of WebPageTest
Patrick Meenan2.3K views
Resource loading, prioritization, HTTP/2 - oh my! von Patrick Meenan
Resource loading, prioritization, HTTP/2 - oh my!Resource loading, prioritization, HTTP/2 - oh my!
Resource loading, prioritization, HTTP/2 - oh my!
Patrick Meenan1.9K views
Scaling Front-End Performance - Velocity 2016 von Patrick Meenan
Scaling Front-End Performance - Velocity 2016Scaling Front-End Performance - Velocity 2016
Scaling Front-End Performance - Velocity 2016
Patrick Meenan1.9K views
Machine Learning RUM - Velocity 2016 von Patrick Meenan
Machine Learning RUM - Velocity 2016Machine Learning RUM - Velocity 2016
Machine Learning RUM - Velocity 2016
Patrick Meenan852 views
Service workers - Velocity 2016 Training von Patrick Meenan
Service workers - Velocity 2016 TrainingService workers - Velocity 2016 Training
Service workers - Velocity 2016 Training
Patrick Meenan668 views
Front-End Single Point of Failure - Velocity 2016 Training von Patrick Meenan
Front-End Single Point of Failure - Velocity 2016 TrainingFront-End Single Point of Failure - Velocity 2016 Training
Front-End Single Point of Failure - Velocity 2016 Training
Patrick Meenan757 views
Measuring performance - Velocity 2016 Training von Patrick Meenan
Measuring performance - Velocity 2016 TrainingMeasuring performance - Velocity 2016 Training
Measuring performance - Velocity 2016 Training
Patrick Meenan880 views
Service Workers for Performance von Patrick Meenan
Service Workers for PerformanceService Workers for Performance
Service Workers for Performance
Patrick Meenan8.1K views
Velocity 2014 nyc WebPagetest private instances von Patrick Meenan
Velocity 2014 nyc   WebPagetest private instancesVelocity 2014 nyc   WebPagetest private instances
Velocity 2014 nyc WebPagetest private instances
Patrick Meenan8.5K views
Mobile web performance - MoDev East von Patrick Meenan
Mobile web performance - MoDev EastMobile web performance - MoDev East
Mobile web performance - MoDev East
Patrick Meenan3.4K views
Tracking Performance - Velocity NYC 2013 von Patrick Meenan
Tracking Performance - Velocity NYC 2013Tracking Performance - Velocity NYC 2013
Tracking Performance - Velocity NYC 2013
Patrick Meenan4.9K views
Measuring the visual experience of website performance von Patrick Meenan
Measuring the visual experience of website performanceMeasuring the visual experience of website performance
Measuring the visual experience of website performance
Patrick Meenan2.6K views
Selecting and deploying automated optimization solutions von Patrick Meenan
Selecting and deploying automated optimization solutionsSelecting and deploying automated optimization solutions
Selecting and deploying automated optimization solutions
Patrick Meenan1.4K views
Velocity 2012 - Taming the Mobile Beast von Patrick Meenan
Velocity 2012 - Taming the Mobile BeastVelocity 2012 - Taming the Mobile Beast
Velocity 2012 - Taming the Mobile Beast
Patrick Meenan54.3K views

Último

iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... von
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
50 views69 Folien
NTGapps NTG LowCode Platform von
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
365 views30 Folien
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue von
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueShapeBlue
94 views13 Folien
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue von
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlueShapeBlue
103 views23 Folien
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... von
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...ShapeBlue
101 views17 Folien
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... von
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
85 views10 Folien

Último(20)

iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... von Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
NTGapps NTG LowCode Platform von Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu365 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue von ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue94 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue von ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue103 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... von ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue101 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... von ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue85 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... von ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue98 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... von James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson156 views
Business Analyst Series 2023 - Week 4 Session 7 von DianaGray10
Business Analyst Series 2023 -  Week 4 Session 7Business Analyst Series 2023 -  Week 4 Session 7
Business Analyst Series 2023 - Week 4 Session 7
DianaGray10126 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue von ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue222 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... von ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue132 views
DRBD Deep Dive - Philipp Reisner - LINBIT von ShapeBlue
DRBD Deep Dive - Philipp Reisner - LINBITDRBD Deep Dive - Philipp Reisner - LINBIT
DRBD Deep Dive - Philipp Reisner - LINBIT
ShapeBlue140 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... von ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue138 views
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ von ShapeBlue
Confidence in CloudStack - Aron Wagner, Nathan Gleason - AmericConfidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
Confidence in CloudStack - Aron Wagner, Nathan Gleason - Americ
ShapeBlue88 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... von ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue117 views
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue von ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlueElevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
Elevating Privacy and Security in CloudStack - Boris Stoyanov - ShapeBlue
ShapeBlue179 views

Frontend SPOF

  • 1. Frontend SPOF Patrick Meenan Google Confidential and Proprietary
  • 2. Credit where credit is due June 2010 - Steve Souders http://www.stevesouders.com/blog/2010/06/01/frontend-spof/ Google Confidential and Proprietary
  • 3. See what it looks like: http://youtu.be/prToLDpjmPw Google Confidential and Proprietary
  • 4. All Because of... <script src="https://platform.twitter.com/anywhere.js?id=ZV0JHq7YJkjozsfohDIleQ&v=1" type="text/javascript" ></script> Google Confidential and Proprietary
  • 5. What Monitoring Says... Active Monitoring ○ Server Monitoring ✔ Base page responded in 1.5 Seconds ○ Full-Browser Monitoring ✔ Page loaded in 29 Seconds (test timeout is 60) Real-User Reporting ○ Analytics Page Views ✔ Analytics loaded and executed asynchronously ○ RUM Performance ✔ If user bailed before onload there is no performance data Google Confidential and Proprietary
  • 6. It Gets Worse! Windows Socket Connect Timeout: 20s Mac/Linux Socket Connect Timeout: Much Higher PER CONNECTION Google Confidential and Proprietary
  • 7. There's More! On that one page, all before the main content: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="http://scripts.verticalacuity.com/vat/mon/vt.js?1329448814"></script> <script type="text/javascript" src="http://cdn.sailthru.com/scout/v1.js?1329448814"></script> <script type="text/javascript" src="//cdn.optimizely.com/js/20728634.js?1329448814"></script> <script src="https://platform.twitter.com/anywhere.js?..." type="text/javascript"></script> Google Confidential and Proprietary
  • 8. But I'd notice it is down... Google Confidential and Proprietary
  • 9. In Iran? Google Confidential and Proprietary https://blogs.akamai.com/2012/02/a-view-of-the-iranian-internet-blockade-from-akamais-intelligent-platform.html
  • 10. or China? Google Confidential and Proprietary http://calendar.perfplanet.com/2011/frontend-spof-in-beijing/
  • 11. We have solutions... Google Confidential and Proprietary
  • 12. Async Snippet Good for code with no dependencies (widgets): Google Confidential and Proprietary
  • 13. Async Loaders Help for chaining together dependencies Control.js ○ http://stevesouders.com/controljs/ LABjs ○ http://labjs.com/ ● Remember to load the loader safely ● Requires a fair bit of manual work Google Confidential and Proprietary
  • 14. Put scripts at the bottom Google Confidential and Proprietary http://stevesouders.com/examples/rule-js-bottom.php
  • 15. Well... Google Confidential and Proprietary
  • 16. Almost... Blocks onload except on IE and iOS 4 Google Confidential and Proprietary http://www.stevesouders.com/blog/2012/01/13/javascript-performance/
  • 17. So, How are we doing? Google Confidential and Proprietary
  • 18. Widgets Google Analytics: Async Google +1: Async Twitter: Async Facebook: Async Delicious: Async (image/href) StumbleUpon: Async Digg: Async Reditt: Blocking AddThis: Blocking ShareThis: Blocking (as of February 2012) Google Confidential and Proprietary
  • 19. Code Libraries (samples) Jquery: Blocking in the head Closure Library: Blocking in the head YUI: Blocking Dojo: Blocking in the head Moo Tools: Blocking in the head Google API's: Blocking (default, Async available in docs) Google Confidential and Proprietary
  • 20. Popular CMS's Wordpress: Blocking in the head Drupal: Blocking in the head Joomla: Blocking in the head Google Confidential and Proprietary
  • 21. Testing for Frontend SPOF Google Confidential and Proprietary
  • 22. Routing to localhost Fails FAST! (connections are rejected) Not good for testing real failure scenarios Google Confidential and Proprietary
  • 23. You need a black hole blackhole.webpagetest.org 72.66.115.13 Hosts File On WebPagetest setDnsName ajax.googleapis.com blackhole.webpagetest.org 72.66.115.13 ajax.googleapis.com setDnsName apis.google.com blackhole.webpagetest.org 72.66.115.13 apis.google.com setDnsName www.google-analytics.com blackhole.webpagetest.org 72.66.115.13 www.google-analytics.com setDnsName connect.facebook.net blackhole.webpagetest.org setDnsName platform.twitter.com blackhole.webpagetest.org 72.66.115.13 connect.facebook.net ... 72.66.115.13 platform.twitter.com navigate your.url.com ... Google Confidential and Proprietary http://blog.patrickmeenan.com/2011/10/testing-for-frontend-spof.html http://www.jpl.nasa.go/spaceimages/details.php?id=PIA13168
  • 24. How pervasive is the problem? Google Confidential and Proprietary
  • 25. "Broken" Sites ● CNN ● MSNBC ● New York Times ● LA Times ● Bloomberg ● ABC News ● CNet news.com ● Pinterest ● ESPN ● AARP ● Business Insider ...From just 20 minutes of looking Google Confidential and Proprietary
  • 26. What do we need to do? Google Confidential and Proprietary
  • 27. Browsers ● Provide an easier way to asynchronously load complex dependency chains ○ async does not maintain order ○ defer does not work for inline scripts ■ and is broken in several versions of IE ● Not block onload for Async scripts ○ Sadly, the spec requires onload blocking ● Implement Resource Timing Google Confidential and Proprietary
  • 28. Widget Owners ● Never EVER provide blocking snippets ● All examples should be asynchronous ● Do not force HTTPS if it isn't required ● Where possible, allow for sites to self-host any critical code Google Confidential and Proprietary
  • 29. CMS Developers ● Build frameworks that encourage async code loading (and encourage their use for default operation) ● Provide a mechanism for tracking the performance of individual plugins Google Confidential and Proprietary
  • 30. Site Owners ● Never load resources that you do not control synchronously (and refuse 3rd party code that doesn't have an async option) ● Do not rely on onload for important functionality ● Make sure your monitoring has aggressive time limits (under 20 seconds) ● Make sure your RUM reporting has an aggressive timeout ● Track RUM failures by region ● Leverage Resource Timing and field RUM analytics when available Google Confidential and Proprietary