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

VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Recently uploaded (20)

UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
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
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 

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