SlideShare une entreprise Scribd logo
1  sur  56
Télécharger pour lire hors ligne
What	
  we	
  can	
  learn	
  from	
  CDNs	
  
about	
  Web	
  Development,	
  
Deployment,	
  and	
  Performance
Tyler	
  McMullen,	
  CTO	
  &	
  Mad	
  Scientist	
  
WebPerf	
  Meetup,	
  London	
  March	
  1st	
  
Lesson:



People	
  Use	
  Their	
  CDNs	
  Wrong
CDNs	
  offer	
  a	
  toolset
• The	
  black	
  box	
  approach	
  isn’t	
  always	
  good	
  
• Configuration	
  isn’t	
  trivial	
  
– And	
  a	
  lot	
  still	
  depends	
  on	
  configuration	
  
• Can’t	
  depend	
  on	
  the	
  CDN	
  to	
  solve	
  all	
  your	
  
problems	
  
• Don’t	
  exacerbate	
  your	
  problems!
http://bigqueri.es/t/sites-­‐that-­‐deliver-­‐images-­‐using-­‐gzip-­‐deflate-­‐encoding/220
Gzipping	
  Images
• Not	
  a	
  very	
  good	
  thing	
  for	
  performance	
  
– Extra	
  bytes	
  
– Extra	
  work	
  for	
  the	
  browser	
  
• But	
  was	
  this	
  the	
  Surrogate’s	
  fault?
More	
  Examples
• Bad	
  caching	
  headers	
  
– max-­‐age,	
  s-­‐maxage	
  have	
  a	
  lot	
  of	
  power!	
  
– stale-­‐if-­‐error	
  and	
  stale-­‐while-­‐revalidate	
  are	
  rad!	
  
• Bad	
  TCP	
  connection	
  management	
  at	
  origin	
  
• Not	
  Gzipping	
  (actual,	
  compressible	
  content)	
  for	
  
origin	
  fetches
With	
  Great	
  Power…
Lesson:



Dynamic	
  Content	
  Is	
  Really	
  Interesting!
What	
  Is	
  Dynamic	
  Content?
• Stuff	
  that’s	
  not	
  static!	
  
• With	
  web	
  traffic,	
  generally	
  the	
  base	
  HTML	
  
– Big	
  deal	
  because	
  it’s	
  blocking	
  
– And	
  sometimes	
  the	
  largest	
  object;	
  longer	
  download	
  
• Some	
  AJAX	
  
• More…
Blocking
Classically,	
  with	
  dynamic	
  content…
Caching
Caching	
  

vs.	
  

Invalidation
We	
  tried…
Dynamic	
  Content	
  Caching	
  Problems
• Serving	
  stale	
  pages	
  
– Lack	
  of	
  good	
  invalidation	
  framework	
  
• Visibility	
  
• Logging
CDNs	
  and	
  Dynamic	
  Content
• Generally,	
  handling	
  dynamic	
  content	
  has	
  been	
  
a	
  matter	
  of	
  transport	
  
– Middle	
  mile	
  optimizations	
  
– TCP	
  tweaks	
  
• Some	
  edge	
  micro	
  caching,	
  but	
  not	
  easy	
  
• ESI
Actually…
• Dynamic	
  content	
  is	
  more	
  cacheable	
  than	
  we	
  think	
  
• Static	
  for	
  short	
  periods	
  of	
  time	
  
• Unpredictable	
  invalidation	
  
– Standard	
  HTTP	
  caching	
  rules	
  aren’t	
  good	
  enough	
  
• Event-­‐driven	
  Content
So	
  Many	
  Benefits!
• Performance	
  
– Faster	
  time	
  to	
  first	
  byte	
  
– Faster	
  start	
  render	
  
– Happy	
  users!	
  
• Offload	
  
– Less	
  work	
  for	
  our	
  servers	
  
– Less	
  bandwidth	
  at	
  origin
What	
  Would	
  Make	
  It	
  Better?
• Programmatic	
  Invalidation	
  
– Granular	
  
– Instantaneous	
  
• Control	
  at	
  the	
  edge,	
  and	
  not	
  just	
  for	
  web	
  pages	
  
– Real-­‐time	
  log	
  files	
  
– Imagine	
  terminating	
  beacons	
  at	
  the	
  edge!
Lesson:



Measurement	
  is	
  Still	
  Hard
Client-­‐side	
  Measurement	
  in	
  CDNs
• Cache	
  hit	
  ratio	
  
– How	
  do	
  you	
  test	
  and	
  measure?	
  
• Long	
  tail	
  content?	
  
• DNS	
  and	
  edge	
  node	
  selection	
  
• TTFB	
  out	
  of	
  datacenter	
  
– Memory	
  hit	
  vs	
  disk	
  hit	
  vs	
  mid-­‐tier	
  hit	
  vs	
  miss	
  
• RUM	
  and	
  synthetic	
  (Cedexis,	
  Catchpoint,	
  etc)
Let’s	
  Test	
  It!
• 3	
  Objects	
  on	
  the	
  same	
  CDN	
  (anonymous)	
  
– Cedexis	
  object	
  
– Small	
  image	
  from	
  Alexa	
  5000	
  site	
  
– Long	
  tail	
  object:	
  ~40	
  times	
  every	
  3-­‐4	
  hours	
  
• Use	
  Catchpoint	
  last	
  mile	
  clients	
  in	
  US	
  
– Test	
  every	
  15	
  minutes	
  
– ~11,500	
  total	
  tests	
  across	
  all	
  test	
  nodes	
  
• Focus	
  measurement	
  on:	
  
– Connect	
  time	
  (TCP)	
  
– Wait	
  time	
  (TTFB)
Cedexis	
  Object
Connect	
  (median) Wait	
  (median)
Cedexis 14ms 19ms
Cedexis	
  Object Alexa	
  5000
Connect	
  (median) Wait	
  (median)
Cedexis 14ms 19ms
Alexa	
  5000 14ms 24ms
Cedexis	
  Object Alexa	
  5000
Connect	
  (median) Wait	
  (median)
Cedexis 14ms 19ms
Alexa	
  5000 14ms 24ms
26%
Cedexis	
  Object Long	
  TailAlexa	
  5000
Connect	
  (median) Wait	
  (median)
Cedexis 14ms 19ms
Alexa	
  5000 14ms 24ms
Long	
  Tail 15ms 29ms
Cedexis	
  Object Long	
  TailAlexa	
  5000
Connect	
  (median) Wait	
  (median)
Cedexis 14ms 19ms
Alexa	
  5000 14ms 24ms
Long	
  Tail 15ms 29ms 20%
Cedexis	
  Object
Count TCP TTFB Count TCP TTFB Count TCP TTFB
Mem 11,074 14ms 19ms 481 14ms 19ms 6741 14ms 20ms
Disk 428 12ms 24ms 9626 15ms 28ms 4692 14ms 31ms
Miss 1 6ms 38ms 1355 16ms 51ms 28 13ms 45ms
Cedexis	
  Object Alexa	
  5000
Count TCP TTFB Count TCP TTFB Count TCP TTFB
Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms
Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms
Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
Cedexis	
  Object Long	
  TailAlexa	
  5000
Count TCP TTFB Count TCP TTFB Count TCP TTFB
Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms
Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms
Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
Cedexis	
  Object Long	
  TailAlexa	
  5000
Count TCP TTFB Count TCP TTFB Count TCP TTFB
Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms
Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms
Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
99.99%
Mem:	
  96.27%	
  
Disk:	
  3.72%
Cedexis	
  Object Long	
  TailAlexa	
  5000
Count TCP TTFB Count TCP TTFB Count TCP TTFB
Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms
Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms
Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
99.99%
Mem:	
  96.27%	
  
Disk:	
  3.72%
99.76%
Mem:	
  58.82%	
  
Disk:	
  40.94%
Cedexis	
  Object Long	
  TailAlexa	
  5000
Count TCP TTFB Count TCP TTFB Count TCP TTFB
Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms
Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms
Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
99.99%
Mem:	
  96.27%	
  
Disk:	
  3.72%
99.76% 88.17%
Mem:	
  58.82%	
  
Disk:	
  40.94%
Mem:	
  4.19%	
  
Disk:	
  83.98%
Measurement!
• Not	
  only	
  do	
  I	
  care	
  about:	
  
– Cache	
  hit	
  rate	
  
– Long	
  tail	
  
– Measuring	
  the	
  right	
  thing	
  
• Fetching	
  from	
  disk	
  could	
  suck!	
  
– SSDs!	
  
• Caching	
  ≠	
  Caching
Lesson:



CDNs	
  Are	
  Not	
  Solved!
We	
  Don’t	
  Cache	
  As	
  Much	
  As	
  We	
  Should!
• HTML	
  and	
  other	
  dynamic	
  content	
  
• Worse	
  cache	
  hit	
  rate	
  than	
  we	
  think	
  
– Especially	
  for	
  long	
  tail	
  content	
  
• Mobile	
  Apps,	
  APIs,	
  etc
Lots	
  of	
  Room
• Making	
  changes	
  still	
  sucks	
  
• Can’t	
  take	
  some	
  things	
  for	
  granted:	
  
– DNS	
  
– Routing	
  
– TCP	
  
– SCALE!	
  
• Plus:	
  lots	
  of	
  room	
  to	
  be	
  creative	
  at	
  the	
  edge!
Thank	
  you!
Lesson:



It’s	
  Not	
  Only	
  About…
…Performance!!!
Security
• Certificate	
  management	
  
• Perimeter	
  security	
  
• DDoS	
  protection	
  <-­‐	
  benefit	
  of	
  scale!
Flexibility,	
  Visibility,	
  and	
  Control
• Integration	
  
• Programmability	
  
• APIs	
  
• Instant	
  purging	
  
• Real	
  time	
  logs
Fun	
  at	
  the	
  Edge!
• Synthetic	
  responses	
  
– Example:	
  node	
  ID	
  for	
  Cedexis	
  measurements	
  
• Cookie	
  manipulation	
  
– Remove/inject/replace/recall	
  
• Beacon	
  termination	
  
– 204	
  responses	
  
– Real	
  time	
  logs	
  
– Awesome!
PERFORMANCE!!
It’s	
  still	
  pretty	
  damn	
  important!
This	
  is	
  not	
  a	
  sales	
  pitch!
Making	
  Changes	
  SUCKS!!
• Configuration	
  changes	
  take	
  way	
  too	
  long	
  
– People	
  are	
  used	
  to	
  making	
  changes	
  real-­‐time	
  
– CDNs	
  aren’t	
  classically	
  good	
  at	
  this	
  
– Phone??	
  
• Purging	
  is	
  a	
  real	
  problem	
  
– Slow	
  
– Difficult	
  
– Not	
  granular	
  enough
Lesson:



There’s	
  More	
  to	
  the	
  Web	
  Than	
  the	
  Web!
Non	
  “web”	
  Traffic
• Video	
  
– HLS	
  (HTTP	
  Live	
  Streaming)	
  
– HTTP-­‐based	
  small	
  video	
  chunks	
  
– Unique	
  by	
  URL	
  
• APIs	
  
– Instant	
  purging	
  can	
  let	
  API	
  calls	
  be	
  cacheable	
  
– Another	
  example	
  of	
  dynamic	
  content	
  cached	
  at	
  the	
  edge	
  
• Mobile	
  Apps
Lesson:



Integrating	
  is	
  Awesome!
The	
  Influence	
  of	
  Clouds
• DevOps	
  people	
  like	
  programmability	
  and	
  
integration	
  
• The	
  CDN	
  is	
  no	
  longer	
  a	
  black	
  box	
  mechanism,	
  
necessarily	
  
• Cliché	
  Alert:	
  Content	
  as	
  a	
  Service!
Real	
  Time	
  Integration
• Tap	
  in	
  to	
  the	
  CDN:	
  
– Instantaneous	
  configuration	
  changes	
  
– Instantaneous	
  cache	
  purge	
  and	
  invalidation	
  
– Real	
  time	
  stats	
  and	
  logs	
  
• Infrastructure	
  as	
  code	
  
– Expect	
  extensive	
  APIs	
  
– Apps	
  need	
  to	
  naturally	
  extend	
  to	
  the	
  CDN	
  
– Your	
  content	
  =>	
  you	
  need	
  control
About	
  Time!!
“Still”
• In	
  the	
  world	
  of	
  FEO	
  
– Webpagetest.org	
  
– RUM	
  
– Synthetic	
  testing	
  vendors	
  
• In	
  the	
  world	
  of	
  CDNs	
  
– Same	
  as	
  far	
  as	
  client	
  performance	
  goes	
  
– Some	
  new	
  things…

Contenu connexe

Tendances

Tendances (20)

SPDY Talk
SPDY TalkSPDY Talk
SPDY Talk
 
Request routing in CDN
Request routing in CDNRequest routing in CDN
Request routing in CDN
 
How Time To First Byte (TTFB) Impacts Your Site’s Performance
How Time To First Byte (TTFB) Impacts Your Site’s PerformanceHow Time To First Byte (TTFB) Impacts Your Site’s Performance
How Time To First Byte (TTFB) Impacts Your Site’s Performance
 
Load balancing at tuenti
Load balancing at tuentiLoad balancing at tuenti
Load balancing at tuenti
 
Network
NetworkNetwork
Network
 
RIPE 78: IPv6 reliability measurements
RIPE 78: IPv6 reliability measurementsRIPE 78: IPv6 reliability measurements
RIPE 78: IPv6 reliability measurements
 
Site Speed Fundamentals
Site Speed FundamentalsSite Speed Fundamentals
Site Speed Fundamentals
 
DINR 2021 Virtual Workshop: Passive vs Active Measurements in the DNS
DINR 2021 Virtual Workshop: Passive vs Active Measurements in the DNSDINR 2021 Virtual Workshop: Passive vs Active Measurements in the DNS
DINR 2021 Virtual Workshop: Passive vs Active Measurements in the DNS
 
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...
Challenges behind the scenes of the large Swiss e-Commerce shop apfelkiste.ch...
 
Network latency - measurement and improvement
Network latency - measurement and improvementNetwork latency - measurement and improvement
Network latency - measurement and improvement
 
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
 
Big data in the energy sector
Big data in the energy sectorBig data in the energy sector
Big data in the energy sector
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
 
HTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないときHTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないとき
 
F5 Monitoring System (On Premise & Cloud Solution)
F5 Monitoring System (On Premise & Cloud Solution)F5 Monitoring System (On Premise & Cloud Solution)
F5 Monitoring System (On Premise & Cloud Solution)
 
Comparing high availability solutions with percona xtradb cluster and percona...
Comparing high availability solutions with percona xtradb cluster and percona...Comparing high availability solutions with percona xtradb cluster and percona...
Comparing high availability solutions with percona xtradb cluster and percona...
 
Llnw bufferbloat
Llnw bufferbloatLlnw bufferbloat
Llnw bufferbloat
 
Http Status Report
Http Status ReportHttp Status Report
Http Status Report
 
Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?Are we really ready to turn off IPv4?
Are we really ready to turn off IPv4?
 
Handle Large Messages In Apache Kafka
Handle Large Messages In Apache KafkaHandle Large Messages In Apache Kafka
Handle Large Messages In Apache Kafka
 

En vedette

En vedette (20)

Advanced VCL Workshop - Rogier Mulhuijzen and Stephen Basile at Fastly Altitu...
Advanced VCL Workshop - Rogier Mulhuijzen and Stephen Basile at Fastly Altitu...Advanced VCL Workshop - Rogier Mulhuijzen and Stephen Basile at Fastly Altitu...
Advanced VCL Workshop - Rogier Mulhuijzen and Stephen Basile at Fastly Altitu...
 
Top 5 Things I've Messed Up in Live Streaming
Top 5 Things I've Messed Up in Live StreamingTop 5 Things I've Messed Up in Live Streaming
Top 5 Things I've Messed Up in Live Streaming
 
Fallacy of Fast
Fallacy of FastFallacy of Fast
Fallacy of Fast
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Design & Performance - Steve Souders at Fastly Altitude 2015
Design & Performance - Steve Souders at Fastly Altitude 2015Design & Performance - Steve Souders at Fastly Altitude 2015
Design & Performance - Steve Souders at Fastly Altitude 2015
 
The Fallacy of Fast - Ines Sombra at Fastly Altitude 2015
The Fallacy of Fast - Ines Sombra at Fastly Altitude 2015The Fallacy of Fast - Ines Sombra at Fastly Altitude 2015
The Fallacy of Fast - Ines Sombra at Fastly Altitude 2015
 
Performance Measuring & Monitoring - Catchpoint CEO Mehdi Daoudi at Fastly Al...
Performance Measuring & Monitoring - Catchpoint CEO Mehdi Daoudi at Fastly Al...Performance Measuring & Monitoring - Catchpoint CEO Mehdi Daoudi at Fastly Al...
Performance Measuring & Monitoring - Catchpoint CEO Mehdi Daoudi at Fastly Al...
 
Applying Varnish
Applying VarnishApplying Varnish
Applying Varnish
 
Developing a Globally Distributed Purging System
Developing a Globally Distributed Purging SystemDeveloping a Globally Distributed Purging System
Developing a Globally Distributed Purging System
 
It Probably Works - QCon 2015
It Probably Works - QCon 2015It Probably Works - QCon 2015
It Probably Works - QCon 2015
 
Confident Refactoring - Ember SF Meetup
Confident Refactoring - Ember SF MeetupConfident Refactoring - Ember SF Meetup
Confident Refactoring - Ember SF Meetup
 
It Probably Works
It Probably WorksIt Probably Works
It Probably Works
 
Building a better web
Building a better webBuilding a better web
Building a better web
 
Rails Caching: Secrets From the Edge
Rails Caching: Secrets From the EdgeRails Caching: Secrets From the Edge
Rails Caching: Secrets From the Edge
 
The future of the edge
The future of the edge The future of the edge
The future of the edge
 
Migrating Target to Fastly - Eddie Roger at Fastly Altitude 2015
Migrating Target to Fastly - Eddie Roger at Fastly Altitude 2015Migrating Target to Fastly - Eddie Roger at Fastly Altitude 2015
Migrating Target to Fastly - Eddie Roger at Fastly Altitude 2015
 
Making ops life easier
Making ops life easierMaking ops life easier
Making ops life easier
 
From Zero to Capacity Planning
From Zero to Capacity PlanningFrom Zero to Capacity Planning
From Zero to Capacity Planning
 
Debugging Your CDN - Austin Spires at Fastly Altitude 2015
Debugging Your CDN - Austin Spires at Fastly Altitude 2015Debugging Your CDN - Austin Spires at Fastly Altitude 2015
Debugging Your CDN - Austin Spires at Fastly Altitude 2015
 
Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]
 

Similaire à What we can learn from CDNs about Web Development, Deployment, and Performance

Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
xlight
 

Similaire à What we can learn from CDNs about Web Development, Deployment, and Performance (20)

Extending your applications to the edge with CDNs
Extending your applications to the edge with CDNsExtending your applications to the edge with CDNs
Extending your applications to the edge with CDNs
 
Expecto Performa! The Magic and Reality of Performance Tuning
Expecto Performa! The Magic and Reality of Performance TuningExpecto Performa! The Magic and Reality of Performance Tuning
Expecto Performa! The Magic and Reality of Performance Tuning
 
Building Big Data Streaming Architectures
Building Big Data Streaming ArchitecturesBuilding Big Data Streaming Architectures
Building Big Data Streaming Architectures
 
Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
OpenNebulaConf2015 1.06 Fermilab Virtual Facility: Data-Intensive Computing i...
OpenNebulaConf2015 1.06 Fermilab Virtual Facility: Data-Intensive Computing i...OpenNebulaConf2015 1.06 Fermilab Virtual Facility: Data-Intensive Computing i...
OpenNebulaConf2015 1.06 Fermilab Virtual Facility: Data-Intensive Computing i...
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Reducing latency on the web with the Azure CDN- TechDays NL 2014
Reducing latency on the web with the Azure CDN- TechDays NL 2014Reducing latency on the web with the Azure CDN- TechDays NL 2014
Reducing latency on the web with the Azure CDN- TechDays NL 2014
 
On the way to low latency (2nd edition)
On the way to low latency (2nd edition)On the way to low latency (2nd edition)
On the way to low latency (2nd edition)
 
Performance
PerformancePerformance
Performance
 
Capacity Planning for fun & profit
Capacity Planning for fun & profitCapacity Planning for fun & profit
Capacity Planning for fun & profit
 
Toward low-latency Java applications - javaOne 2014
Toward low-latency Java applications - javaOne 2014Toward low-latency Java applications - javaOne 2014
Toward low-latency Java applications - javaOne 2014
 
Chirp 2010: Scaling Twitter
Chirp 2010: Scaling TwitterChirp 2010: Scaling Twitter
Chirp 2010: Scaling Twitter
 
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
 
Otimizando servidores web
Otimizando servidores webOtimizando servidores web
Otimizando servidores web
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Presto at Tivo, Boston Hadoop Meetup
Presto at Tivo, Boston Hadoop MeetupPresto at Tivo, Boston Hadoop Meetup
Presto at Tivo, Boston Hadoop Meetup
 
Артем Оробец «На пути к low-latency»
Артем Оробец «На пути к low-latency»Артем Оробец «На пути к low-latency»
Артем Оробец «На пути к low-latency»
 

Plus de Fastly

Plus de Fastly (20)

Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at ScaleAltitude San Francisco 2018: Preparing for Video Streaming Events at Scale
Altitude San Francisco 2018: Preparing for Video Streaming Events at Scale
 
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the InternetAltitude San Francisco 2018: Building the Souther Hemisphere of the Internet
Altitude San Francisco 2018: Building the Souther Hemisphere of the Internet
 
Altitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup StreamAltitude San Francisco 2018: The World Cup Stream
Altitude San Francisco 2018: The World Cup Stream
 
Altitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our DestinyAltitude San Francisco 2018: We Own Our Destiny
Altitude San Francisco 2018: We Own Our Destiny
 
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
Altitude San Francisco 2018: Scale and Stability at the Edge with 1.4 Billion...
 
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless MigrationAltitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
Altitude San Francisco 2018: Moving Off the Monolith: A Seamless Migration
 
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub PagesAltitude San Francisco 2018: Bringing TLS to GitHub Pages
Altitude San Francisco 2018: Bringing TLS to GitHub Pages
 
Altitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation WorkshopAltitude San Francisco 2018: HTTP Invalidation Workshop
Altitude San Francisco 2018: HTTP Invalidation Workshop
 
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and WoeAltitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
Altitude San Francisco 2018: HTTP/2 Tales: Discovery and Woe
 
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
Altitude San Francisco 2018: How Magento moved to the cloud while maintaining...
 
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per dayAltitude San Francisco 2018: Scaling Ethereum to 10B requests per day
Altitude San Francisco 2018: Scaling Ethereum to 10B requests per day
 
Altitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the EdgeAltitude San Francisco 2018: Authentication at the Edge
Altitude San Francisco 2018: Authentication at the Edge
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & Applications
 
Altitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly WorkshopAltitude San Francisco 2018: Testing with Fastly Workshop
Altitude San Francisco 2018: Testing with Fastly Workshop
 
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORKAltitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
Altitude San Francisco 2018: Fastly Purge Control at the USA TODAY NETWORK
 
Altitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF WorkshopAltitude San Francisco 2018: WAF Workshop
Altitude San Francisco 2018: WAF Workshop
 
Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge Altitude San Francisco 2018: Logging at the Edge
Altitude San Francisco 2018: Logging at the Edge
 
Altitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop DocsAltitude San Francisco 2018: Video Workshop Docs
Altitude San Francisco 2018: Video Workshop Docs
 
Altitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the EdgeAltitude San Francisco 2018: Programming the Edge
Altitude San Francisco 2018: Programming the Edge
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 

What we can learn from CDNs about Web Development, Deployment, and Performance

  • 1. What  we  can  learn  from  CDNs   about  Web  Development,   Deployment,  and  Performance Tyler  McMullen,  CTO  &  Mad  Scientist   WebPerf  Meetup,  London  March  1st  
  • 3. CDNs  offer  a  toolset • The  black  box  approach  isn’t  always  good   • Configuration  isn’t  trivial   – And  a  lot  still  depends  on  configuration   • Can’t  depend  on  the  CDN  to  solve  all  your   problems   • Don’t  exacerbate  your  problems!
  • 5. Gzipping  Images • Not  a  very  good  thing  for  performance   – Extra  bytes   – Extra  work  for  the  browser   • But  was  this  the  Surrogate’s  fault?
  • 6. More  Examples • Bad  caching  headers   – max-­‐age,  s-­‐maxage  have  a  lot  of  power!   – stale-­‐if-­‐error  and  stale-­‐while-­‐revalidate  are  rad!   • Bad  TCP  connection  management  at  origin   • Not  Gzipping  (actual,  compressible  content)  for   origin  fetches
  • 8. Lesson:
 
 Dynamic  Content  Is  Really  Interesting!
  • 9. What  Is  Dynamic  Content? • Stuff  that’s  not  static!   • With  web  traffic,  generally  the  base  HTML   – Big  deal  because  it’s  blocking   – And  sometimes  the  largest  object;  longer  download   • Some  AJAX   • More…
  • 10.
  • 12. Classically,  with  dynamic  content… Caching
  • 14.
  • 15.
  • 16.
  • 18. Dynamic  Content  Caching  Problems • Serving  stale  pages   – Lack  of  good  invalidation  framework   • Visibility   • Logging
  • 19. CDNs  and  Dynamic  Content • Generally,  handling  dynamic  content  has  been   a  matter  of  transport   – Middle  mile  optimizations   – TCP  tweaks   • Some  edge  micro  caching,  but  not  easy   • ESI
  • 20. Actually… • Dynamic  content  is  more  cacheable  than  we  think   • Static  for  short  periods  of  time   • Unpredictable  invalidation   – Standard  HTTP  caching  rules  aren’t  good  enough   • Event-­‐driven  Content
  • 21. So  Many  Benefits! • Performance   – Faster  time  to  first  byte   – Faster  start  render   – Happy  users!   • Offload   – Less  work  for  our  servers   – Less  bandwidth  at  origin
  • 22. What  Would  Make  It  Better? • Programmatic  Invalidation   – Granular   – Instantaneous   • Control  at  the  edge,  and  not  just  for  web  pages   – Real-­‐time  log  files   – Imagine  terminating  beacons  at  the  edge!
  • 24. Client-­‐side  Measurement  in  CDNs • Cache  hit  ratio   – How  do  you  test  and  measure?   • Long  tail  content?   • DNS  and  edge  node  selection   • TTFB  out  of  datacenter   – Memory  hit  vs  disk  hit  vs  mid-­‐tier  hit  vs  miss   • RUM  and  synthetic  (Cedexis,  Catchpoint,  etc)
  • 25. Let’s  Test  It! • 3  Objects  on  the  same  CDN  (anonymous)   – Cedexis  object   – Small  image  from  Alexa  5000  site   – Long  tail  object:  ~40  times  every  3-­‐4  hours   • Use  Catchpoint  last  mile  clients  in  US   – Test  every  15  minutes   – ~11,500  total  tests  across  all  test  nodes   • Focus  measurement  on:   – Connect  time  (TCP)   – Wait  time  (TTFB)
  • 26. Cedexis  Object Connect  (median) Wait  (median) Cedexis 14ms 19ms
  • 27. Cedexis  Object Alexa  5000 Connect  (median) Wait  (median) Cedexis 14ms 19ms Alexa  5000 14ms 24ms
  • 28. Cedexis  Object Alexa  5000 Connect  (median) Wait  (median) Cedexis 14ms 19ms Alexa  5000 14ms 24ms 26%
  • 29. Cedexis  Object Long  TailAlexa  5000 Connect  (median) Wait  (median) Cedexis 14ms 19ms Alexa  5000 14ms 24ms Long  Tail 15ms 29ms
  • 30. Cedexis  Object Long  TailAlexa  5000 Connect  (median) Wait  (median) Cedexis 14ms 19ms Alexa  5000 14ms 24ms Long  Tail 15ms 29ms 20%
  • 31. Cedexis  Object Count TCP TTFB Count TCP TTFB Count TCP TTFB Mem 11,074 14ms 19ms 481 14ms 19ms 6741 14ms 20ms Disk 428 12ms 24ms 9626 15ms 28ms 4692 14ms 31ms Miss 1 6ms 38ms 1355 16ms 51ms 28 13ms 45ms
  • 32. Cedexis  Object Alexa  5000 Count TCP TTFB Count TCP TTFB Count TCP TTFB Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
  • 33. Cedexis  Object Long  TailAlexa  5000 Count TCP TTFB Count TCP TTFB Count TCP TTFB Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms
  • 34. Cedexis  Object Long  TailAlexa  5000 Count TCP TTFB Count TCP TTFB Count TCP TTFB Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms 99.99% Mem:  96.27%   Disk:  3.72%
  • 35. Cedexis  Object Long  TailAlexa  5000 Count TCP TTFB Count TCP TTFB Count TCP TTFB Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms 99.99% Mem:  96.27%   Disk:  3.72% 99.76% Mem:  58.82%   Disk:  40.94%
  • 36. Cedexis  Object Long  TailAlexa  5000 Count TCP TTFB Count TCP TTFB Count TCP TTFB Mem 11,074 14ms 19ms 6741 14ms 20ms 481 14ms 19ms Disk 428 12ms 24ms 4692 14ms 31ms 9626 15ms 28ms Miss 1 6ms 38ms 28 13ms 45ms 1355 16ms 51ms 99.99% Mem:  96.27%   Disk:  3.72% 99.76% 88.17% Mem:  58.82%   Disk:  40.94% Mem:  4.19%   Disk:  83.98%
  • 37. Measurement! • Not  only  do  I  care  about:   – Cache  hit  rate   – Long  tail   – Measuring  the  right  thing   • Fetching  from  disk  could  suck!   – SSDs!   • Caching  ≠  Caching
  • 39. We  Don’t  Cache  As  Much  As  We  Should! • HTML  and  other  dynamic  content   • Worse  cache  hit  rate  than  we  think   – Especially  for  long  tail  content   • Mobile  Apps,  APIs,  etc
  • 40. Lots  of  Room • Making  changes  still  sucks   • Can’t  take  some  things  for  granted:   – DNS   – Routing   – TCP   – SCALE!   • Plus:  lots  of  room  to  be  creative  at  the  edge!
  • 44. Security • Certificate  management   • Perimeter  security   • DDoS  protection  <-­‐  benefit  of  scale!
  • 45. Flexibility,  Visibility,  and  Control • Integration   • Programmability   • APIs   • Instant  purging   • Real  time  logs
  • 46. Fun  at  the  Edge! • Synthetic  responses   – Example:  node  ID  for  Cedexis  measurements   • Cookie  manipulation   – Remove/inject/replace/recall   • Beacon  termination   – 204  responses   – Real  time  logs   – Awesome!
  • 48. This  is  not  a  sales  pitch!
  • 49. Making  Changes  SUCKS!! • Configuration  changes  take  way  too  long   – People  are  used  to  making  changes  real-­‐time   – CDNs  aren’t  classically  good  at  this   – Phone??   • Purging  is  a  real  problem   – Slow   – Difficult   – Not  granular  enough
  • 50. Lesson:
 
 There’s  More  to  the  Web  Than  the  Web!
  • 51. Non  “web”  Traffic • Video   – HLS  (HTTP  Live  Streaming)   – HTTP-­‐based  small  video  chunks   – Unique  by  URL   • APIs   – Instant  purging  can  let  API  calls  be  cacheable   – Another  example  of  dynamic  content  cached  at  the  edge   • Mobile  Apps
  • 53. The  Influence  of  Clouds • DevOps  people  like  programmability  and   integration   • The  CDN  is  no  longer  a  black  box  mechanism,   necessarily   • Cliché  Alert:  Content  as  a  Service!
  • 54. Real  Time  Integration • Tap  in  to  the  CDN:   – Instantaneous  configuration  changes   – Instantaneous  cache  purge  and  invalidation   – Real  time  stats  and  logs   • Infrastructure  as  code   – Expect  extensive  APIs   – Apps  need  to  naturally  extend  to  the  CDN   – Your  content  =>  you  need  control
  • 56. “Still” • In  the  world  of  FEO   – Webpagetest.org   – RUM   – Synthetic  testing  vendors   • In  the  world  of  CDNs   – Same  as  far  as  client  performance  goes   – Some  new  things…