SlideShare a Scribd company logo
1 of 12
1 
Automate web performance metrics 
how to measure cdn 
performance? 
Marc Cortinas – Production Service - Webops - August 2014
2 
Agenda 
Why? 
Increase web preformance = Sales 
Motivation PS-9063 
1. How to measure web performance metrics? 
2. How to automated web testing? 
3. Combine: automate + web performance 
4. What’s NodeJS? PhantomJS? QtWebKit? 
5. Phantomas – Features 
6. Phantomas – Metric Choice 
7. Arquitecture 
8. Grafana Dashboard 
9. Which CDN are we goind to measure?
Tools used to measure web performance metrics 
MAIN OBJECTIVE: 
Enumerate different tools to calculate web performance in our application 
Tools: 
1. Pluguins/Browser features:  Firebug, HTTP Tamper Data, Chrome 
Developer Tools, Firefox Developer Tools, etc…  
2. applications: Fiddler, Har 101(maybe gained by 
phantomjs)+Tools(yslow),phantomas-grunt 
3. $$ External Services $$ : Iplabel, Monitis, Pingdom, Apica, AlertSite 
4. Others solutions: 
3 
1. Nagios + check_http 
2. Time + Curl/wget 
3. Monit + http check 
4. Munin + http_loadtime
4 
Tools used to automate web testing 
MAIN OBJECTIVE: 
Enumerate different tools to automate web testing 
Tools: 
1. Selenium Grid + Jenkins 
2. Others +++ Help me!!! 
Combine: automate + web performance 
MAIN OBJECTIVE: 
Automate some web performance metric solution 
Candidates: (all based on NodeJS) 
1. PhantomJS + Yslow : HAR + YSLOW 
 Yslow: less features than phantomas 
5 
2. Grunt-phantomas : 
 Build-GUI from phantomas is so limited 
 Data stored in JSON file 
3. Our solution: Grafana + Phantomas 
1. Phantomas to collect data in CSV files 
2. phan2graph.py Python Script to send to graphite 
3. One sensor in each AWS EC2 region (blog account) 
 Micro instances is not allowed on VPC (ireland) 
4. Sync whisper files(+backup) VS multiples datasources in 
Grafana(+realtime)
What’s NodeJS? PhantomJS? QtWebKit? 
MAIN OBJECTIVE: 
Describe basic concepts to understand phantomas: 
1. NodeJS: is a platform built on Chrome's JavaScript runtime for easily building 
6 
fast, scalable network applications 
2. PhantomJS: PhantomJS is a headless WebKit scriptable with a JavaScript 
API. It has fast and native support for various web standards: DOM handling, 
CSS selector, JSON, Canvas, and SVG. Based on QtWebKit 
3. QtWebKit: web content engine based on the Open Source WebKit project, 
the same engine used by browsers such as Google Chrome and Safari from 
Apple.
7 
Phantomas - Features 
MAIN OBJECTIVE: 
List of main useful features 
Features: 
1.  Command line tool  
2. Internal solution, I prefer that external solution 
3. Full-load page, 
4. 3rd parties calls can be discarted (explicit list of domain allowed) 
5. Multiple runs to improve median datas 
6. Differents output data formats: JSON, CSV, ElasticSearch, 
7. Metrics can be sent to statds, elasticsearch (graphite too now! ) 
8. Timeout parameter 
9. 2 web engine avaible: qtwebkit (default) or gecko (experimental) 
10. User-agent switcher 
11. HAR file export 
12. Screenshot to SVG
8 
Phantomas – Metrics Choice 
MAIN OBJECTIVE: 
List of metrics: https://github.com/macbre/phantomas 
Metrics selected to choice CDN: 
1. Median Latency: median value of time to the first byte for all responses 
2. Full Load Page Time: time it took to receive the last byte of the last HTTP 
response 
3. Number of assets not gziped: static assets that were not gzipped 
4. Fastest Response: the time to the last byte of the fastest response 
Metrics not analized yet but maybe is interesting: 
timeToFirstCss: time it took to receive the last byte of the first CSS 
timeToFirstJs: time it took to receive the last byte of the first JS 
timeToFirstImage: time it took to receive the last byte of the first image 
cachingNotSpecified: responses with no caching header sent (either Cache-Control or Expires) 
cachingTooShort: responses with too short (less than a week) caching time 
cachingDisabled: responses with caching disabled (max-age=0) 
oldCachingHeaders: responses with old, HTTP 1.0 caching headers (Expires and Pragma)
9 
Architecture 
CSV 
phant2graph.py 
Grafana 
phant 
AWS 
Cogent 
Colt 
other.. 
Akamai 
Fastly 
webop 
Graphite Graphite 
rsync 
whisper file whisper file 
Code Name Graphite URL 
ap-southeast-1 Singapore http://phant-singapore.services.odigeo.com/dashboard/ - Singapore 
ap-southeast-2 Sydney http://phant-sydney.services.odigeo.com/dashboard/ - Sydney 
eu-west-1 Ireland http://phant-ireland.services.odigeo.com/dashboard/ - Ireland 
sa-east-1 Sao Paulo http://phant-saopaulo.services.odigeo.com/dashboard/ - Saopaulo 
us-east-1 Northern Virginia http://phant-virginia.services.odigeo.com/dashboard/ - Virginia 
us-west-1 Northern California http://phant-california.services.odigeo.com/dashboard/ - California
10 
Grafana Dashboard 
• Web performance by CDN 
• Web performance by Region
Which CDN are we goind to measure? 
1. All content: the main domain browseable throught CDN 
1. AWS Cloudfront 
2. Fastly 
3. Limelight 
4. Akamai 
5. EdgeCast 
6. Own 
7. … 
8. Multi-CDN (JS detect the region and select CDN) 
2. Only static: exclusive domain for static content 
11 
1. AWS Cloudfront 
2. Fastly
12 
Thanks... Questions?

More Related Content

What's hot

High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
Albert Chen
 
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Ontico
 

What's hot (20)

Using NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content CacheUsing NGINX as an Effective and Highly Available Content Cache
Using NGINX as an Effective and Highly Available Content Cache
 
Maximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINXMaximizing PHP Performance with NGINX
Maximizing PHP Performance with NGINX
 
5 things you didn't know nginx could do
5 things you didn't know nginx could do5 things you didn't know nginx could do
5 things you didn't know nginx could do
 
What's New in NGINX Plus R12?
What's New in NGINX Plus R12? What's New in NGINX Plus R12?
What's New in NGINX Plus R12?
 
Delivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWSDelivering High-Availability Web Services with NGINX Plus on AWS
Delivering High-Availability Web Services with NGINX Plus on AWS
 
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...
 
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
Mitigating Security Threats with Fastly - Joe Williams at Fastly Altitude 2015
 
Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101
 
Nginx
NginxNginx
Nginx
 
5 things you didn't know nginx could do velocity
5 things you didn't know nginx could do   velocity5 things you didn't know nginx could do   velocity
5 things you didn't know nginx could do velocity
 
Altitude SF 2017: Advanced VCL: Shielding and Clustering
Altitude SF 2017: Advanced VCL: Shielding and ClusteringAltitude SF 2017: Advanced VCL: Shielding and Clustering
Altitude SF 2017: Advanced VCL: Shielding and Clustering
 
HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011HTTP cache @ PUG Rome 03-29-2011
HTTP cache @ PUG Rome 03-29-2011
 
Load Balancing Applications with NGINX in a CoreOS Cluster
Load Balancing Applications with NGINX in a CoreOS ClusterLoad Balancing Applications with NGINX in a CoreOS Cluster
Load Balancing Applications with NGINX in a CoreOS Cluster
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
 
Pulsar Summit Asia - Running a secure pulsar cluster
Pulsar Summit Asia -  Running a secure pulsar clusterPulsar Summit Asia -  Running a secure pulsar cluster
Pulsar Summit Asia - Running a secure pulsar cluster
 
Choosing a Web Architecture for Perl
Choosing a Web Architecture for PerlChoosing a Web Architecture for Perl
Choosing a Web Architecture for Perl
 
Lessons from managing a Pulsar cluster (Nutanix)
Lessons from managing a Pulsar cluster (Nutanix)Lessons from managing a Pulsar cluster (Nutanix)
Lessons from managing a Pulsar cluster (Nutanix)
 
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
Как сделать высоконагруженный сервис, не зная количество нагрузки / Олег Обле...
 
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and TearsCamel Desing Patterns Learned Through Blood, Sweat, and Tears
Camel Desing Patterns Learned Through Blood, Sweat, and Tears
 
Altitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rateAltitude SF 2017: Optimizing your hit rate
Altitude SF 2017: Optimizing your hit rate
 

Similar to how to mesure web performance metrics

Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Felix Gessert
 
When Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting RealWhen Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting Real
Nicholas Jansma
 

Similar to how to mesure web performance metrics (20)

Gruntwork Executive Summary
Gruntwork Executive SummaryGruntwork Executive Summary
Gruntwork Executive Summary
 
Analysis of Google Page Speed Insight
Analysis of Google Page Speed InsightAnalysis of Google Page Speed Insight
Analysis of Google Page Speed Insight
 
Clickhouse at Cloudflare. By Marek Vavrusa
Clickhouse at Cloudflare. By Marek VavrusaClickhouse at Cloudflare. By Marek Vavrusa
Clickhouse at Cloudflare. By Marek Vavrusa
 
Clickhouse at Cloudflare. By Marek Vavrusa
Clickhouse at Cloudflare. By Marek VavrusaClickhouse at Cloudflare. By Marek Vavrusa
Clickhouse at Cloudflare. By Marek Vavrusa
 
Easy access to open stack object storage
Easy access to open stack object storageEasy access to open stack object storage
Easy access to open stack object storage
 
Stream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NETStream Processing with Apache Kafka and .NET
Stream Processing with Apache Kafka and .NET
 
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
AWS re:Invent 2016: Deep-Dive: Native, Hybrid and Web patterns with Serverles...
 
Building a REST API with Cassandra on Datastax Astra Using Python and Node
Building a REST API with Cassandra on Datastax Astra Using Python and NodeBuilding a REST API with Cassandra on Datastax Astra Using Python and Node
Building a REST API with Cassandra on Datastax Astra Using Python and Node
 
Droplr Serverless Revolution - How we killed 50 servers in a year
Droplr Serverless Revolution - How we killed 50 servers in a yearDroplr Serverless Revolution - How we killed 50 servers in a year
Droplr Serverless Revolution - How we killed 50 servers in a year
 
Massively Scaled High Performance Web Services with PHP
Massively Scaled High Performance Web Services with PHPMassively Scaled High Performance Web Services with PHP
Massively Scaled High Performance Web Services with PHP
 
Top 8 WCM Trends 2010
Top 8 WCM Trends 2010Top 8 WCM Trends 2010
Top 8 WCM Trends 2010
 
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
Building a Global-Scale Multi-Tenant Cloud Platform on AWS and Docker: Lesson...
 
JS digest. November 2017
JS digest. November 2017JS digest. November 2017
JS digest. November 2017
 
12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat12 core technologies you should learn, love, and hate to be a 'real' technocrat
12 core technologies you should learn, love, and hate to be a 'real' technocrat
 
Fluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting realFluent 2018: When third parties stop being polite... and start getting real
Fluent 2018: When third parties stop being polite... and start getting real
 
When Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting RealWhen Third Parties Stop Being Polite... and Start Getting Real
When Third Parties Stop Being Polite... and Start Getting Real
 
IoT-javascript-2019-fosdem
IoT-javascript-2019-fosdemIoT-javascript-2019-fosdem
IoT-javascript-2019-fosdem
 
FIWARE Wednesday Webinars - Short Term History within Smart Systems
FIWARE Wednesday Webinars - Short Term History within Smart SystemsFIWARE Wednesday Webinars - Short Term History within Smart Systems
FIWARE Wednesday Webinars - Short Term History within Smart Systems
 
From CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CIFrom CoreOS to Kubernetes and Concourse CI
From CoreOS to Kubernetes and Concourse CI
 
Perf test Eng interview preparation
Perf test Eng interview preparationPerf test Eng interview preparation
Perf test Eng interview preparation
 

Recently uploaded

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
hublikarsn
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

Computer Graphics Introduction To Curves
Computer Graphics Introduction To CurvesComputer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257Memory Interfacing of 8086 with DMA 8257
Memory Interfacing of 8086 with DMA 8257
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
👉 Yavatmal Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top Class Call Girl S...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 

how to mesure web performance metrics

  • 1. 1 Automate web performance metrics how to measure cdn performance? Marc Cortinas – Production Service - Webops - August 2014
  • 2. 2 Agenda Why? Increase web preformance = Sales Motivation PS-9063 1. How to measure web performance metrics? 2. How to automated web testing? 3. Combine: automate + web performance 4. What’s NodeJS? PhantomJS? QtWebKit? 5. Phantomas – Features 6. Phantomas – Metric Choice 7. Arquitecture 8. Grafana Dashboard 9. Which CDN are we goind to measure?
  • 3. Tools used to measure web performance metrics MAIN OBJECTIVE: Enumerate different tools to calculate web performance in our application Tools: 1. Pluguins/Browser features:  Firebug, HTTP Tamper Data, Chrome Developer Tools, Firefox Developer Tools, etc…  2. applications: Fiddler, Har 101(maybe gained by phantomjs)+Tools(yslow),phantomas-grunt 3. $$ External Services $$ : Iplabel, Monitis, Pingdom, Apica, AlertSite 4. Others solutions: 3 1. Nagios + check_http 2. Time + Curl/wget 3. Monit + http check 4. Munin + http_loadtime
  • 4. 4 Tools used to automate web testing MAIN OBJECTIVE: Enumerate different tools to automate web testing Tools: 1. Selenium Grid + Jenkins 2. Others +++ Help me!!! 
  • 5. Combine: automate + web performance MAIN OBJECTIVE: Automate some web performance metric solution Candidates: (all based on NodeJS) 1. PhantomJS + Yslow : HAR + YSLOW  Yslow: less features than phantomas 5 2. Grunt-phantomas :  Build-GUI from phantomas is so limited  Data stored in JSON file 3. Our solution: Grafana + Phantomas 1. Phantomas to collect data in CSV files 2. phan2graph.py Python Script to send to graphite 3. One sensor in each AWS EC2 region (blog account)  Micro instances is not allowed on VPC (ireland) 4. Sync whisper files(+backup) VS multiples datasources in Grafana(+realtime)
  • 6. What’s NodeJS? PhantomJS? QtWebKit? MAIN OBJECTIVE: Describe basic concepts to understand phantomas: 1. NodeJS: is a platform built on Chrome's JavaScript runtime for easily building 6 fast, scalable network applications 2. PhantomJS: PhantomJS is a headless WebKit scriptable with a JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. Based on QtWebKit 3. QtWebKit: web content engine based on the Open Source WebKit project, the same engine used by browsers such as Google Chrome and Safari from Apple.
  • 7. 7 Phantomas - Features MAIN OBJECTIVE: List of main useful features Features: 1.  Command line tool  2. Internal solution, I prefer that external solution 3. Full-load page, 4. 3rd parties calls can be discarted (explicit list of domain allowed) 5. Multiple runs to improve median datas 6. Differents output data formats: JSON, CSV, ElasticSearch, 7. Metrics can be sent to statds, elasticsearch (graphite too now! ) 8. Timeout parameter 9. 2 web engine avaible: qtwebkit (default) or gecko (experimental) 10. User-agent switcher 11. HAR file export 12. Screenshot to SVG
  • 8. 8 Phantomas – Metrics Choice MAIN OBJECTIVE: List of metrics: https://github.com/macbre/phantomas Metrics selected to choice CDN: 1. Median Latency: median value of time to the first byte for all responses 2. Full Load Page Time: time it took to receive the last byte of the last HTTP response 3. Number of assets not gziped: static assets that were not gzipped 4. Fastest Response: the time to the last byte of the fastest response Metrics not analized yet but maybe is interesting: timeToFirstCss: time it took to receive the last byte of the first CSS timeToFirstJs: time it took to receive the last byte of the first JS timeToFirstImage: time it took to receive the last byte of the first image cachingNotSpecified: responses with no caching header sent (either Cache-Control or Expires) cachingTooShort: responses with too short (less than a week) caching time cachingDisabled: responses with caching disabled (max-age=0) oldCachingHeaders: responses with old, HTTP 1.0 caching headers (Expires and Pragma)
  • 9. 9 Architecture CSV phant2graph.py Grafana phant AWS Cogent Colt other.. Akamai Fastly webop Graphite Graphite rsync whisper file whisper file Code Name Graphite URL ap-southeast-1 Singapore http://phant-singapore.services.odigeo.com/dashboard/ - Singapore ap-southeast-2 Sydney http://phant-sydney.services.odigeo.com/dashboard/ - Sydney eu-west-1 Ireland http://phant-ireland.services.odigeo.com/dashboard/ - Ireland sa-east-1 Sao Paulo http://phant-saopaulo.services.odigeo.com/dashboard/ - Saopaulo us-east-1 Northern Virginia http://phant-virginia.services.odigeo.com/dashboard/ - Virginia us-west-1 Northern California http://phant-california.services.odigeo.com/dashboard/ - California
  • 10. 10 Grafana Dashboard • Web performance by CDN • Web performance by Region
  • 11. Which CDN are we goind to measure? 1. All content: the main domain browseable throught CDN 1. AWS Cloudfront 2. Fastly 3. Limelight 4. Akamai 5. EdgeCast 6. Own 7. … 8. Multi-CDN (JS detect the region and select CDN) 2. Only static: exclusive domain for static content 11 1. AWS Cloudfront 2. Fastly