extending your applications to the edge with cdns

138
Extending Applica/ons To The Edge With CDNs Hooman Behesh/, VP Technology Webperf meetup NYC – May 12 2015

Upload: sergey-chernyshev

Post on 28-Jul-2015

550 views

Category:

Internet


1 download

TRANSCRIPT

Page 1: Extending your applications to the edge with CDNs

Extending  Applica/ons  To  The  Edge  With  CDNs  

Hooman  Behesh/,  VP  Technology  

Webperf  meetup  NYC  –  May  12  2015  

Page 2: Extending your applications to the edge with CDNs

What  is  a  CDN  

•  Global  network  of  HTTP  caches  – Get  content  closer  to  users  

•  Performance  benefits  •  offload  

Page 3: Extending your applications to the edge with CDNs
Page 4: Extending your applications to the edge with CDNs
Page 5: Extending your applications to the edge with CDNs
Page 6: Extending your applications to the edge with CDNs

In  the  past…  

Page 7: Extending your applications to the edge with CDNs

Classic  CDNs  

•  Black  box  service  •  Making  changes  sucked!  •  LiRle  to  no  real-­‐/me  interfaces  – APIs  or  configura/on  management  

•  Lots  of  professional  services  •  Decent  caching,  terrible  uncaching  

Page 8: Extending your applications to the edge with CDNs

Cacheable  

Uncacheable  Sta3c  Dynamic  

How  classic  CDNs  look  at  your  content  

Page 9: Extending your applications to the edge with CDNs

Cache-Control: max-age=31536000

Page 10: Extending your applications to the edge with CDNs

Classic  CDNs:  dynamic  content  

•  Focused  on  delivery:  transport  op/miza/on  

Page 11: Extending your applications to the edge with CDNs

But  some3mes…  

Page 12: Extending your applications to the edge with CDNs

I  know  you’re  calling  it  dynamic,  but  it’s  kind  of  sta3c  some3mes  

Page 13: Extending your applications to the edge with CDNs

I  know  you’re  calling  it  dynamic,  but  it’s  kind  of  sta3c  some3mes  

That’s  cool,  how  long  is  it  sta3c  for?  

Page 14: Extending your applications to the edge with CDNs

That’s  cool,  how  long  is  it  sta3c  for?  Some3mes  a  liFle  bit,  

some3mes  a  lot  

Page 15: Extending your applications to the edge with CDNs

Some3mes  a  liFle  bit,  some3mes  a  lot   Neat!  

Page 16: Extending your applications to the edge with CDNs

Some3mes  a  liFle  bit,  some3mes  a  lot   You  look  great  today!  

Page 17: Extending your applications to the edge with CDNs

You  look  great  today!  Don’t  change  the  subject!    How  do  I  

cache  it?  

Page 18: Extending your applications to the edge with CDNs

Don’t  change  the  subject!    How  do  I  

cache  it?  Cache  it  for  half  an  

hour?  

Page 19: Extending your applications to the edge with CDNs

Cache  it  for  half  an  hour?  Some3mes  it  changes  

much  faster  

Page 20: Extending your applications to the edge with CDNs

Some3mes  it  changes  much  faster  

Cache  it  for  10  minutes?  

Page 21: Extending your applications to the edge with CDNs

Cache  it  for  10  minutes?  Are  you  just  guessing  

right  now?  

Page 22: Extending your applications to the edge with CDNs

Are  you  just  guessing  right  now?  

Just  trying  to  figure  out  your  comfort  

level  with  mistakes!  

Page 23: Extending your applications to the edge with CDNs

Expiry  guessing!  

Page 24: Extending your applications to the edge with CDNs

Terrible  Caching  

Page 25: Extending your applications to the edge with CDNs

Terrible  Caching  

Terrible  Anxiety  

or  

(ex:  news  story)  

Page 26: Extending your applications to the edge with CDNs

Things  are  different  today  

Page 27: Extending your applications to the edge with CDNs

Today…  

•  Influenced  by  clouds  •  Devops  requires  programmability  and  control  •  CDNs  should  be  part  of  the  applica/on  •  Real-­‐/me  integra/on  –  Changes  and  APIs  

•  Unpredictable  content  expiry  •  Your  content  à  you  need  control    

Page 28: Extending your applications to the edge with CDNs

What  does  this  all  mean?  

Page 29: Extending your applications to the edge with CDNs

Control  

Visibility  

Cacheability  

Page 30: Extending your applications to the edge with CDNs

Control  

Visibility  

Cacheability  

Page 31: Extending your applications to the edge with CDNs

Cacheability  

•  Granularity  in  caching  rules  (i.e.  cache  the  way  you  want)  –  Customizable  cache  keys  –  Ex:  geo-­‐ip  caching  –  Ex:  normalizing  user  agents  

•  Cache  everything  –  Expect  high  cache-­‐hit  ra/os  – No  cache-­‐control  anxiety!  

Page 32: Extending your applications to the edge with CDNs

Cacheability  

•  Granularity  in  caching  rules  (i.e.  cache  the  way  you  want)  –  Customizable  cache  keys  –  Ex:  geo-­‐ip  caching  –  Ex:  normalizing  user  agents  

•  Cache  everything  –  Expect  high  cache-­‐hit  ra/os  – No  cache-­‐control  anxiety!  

Page 33: Extending your applications to the edge with CDNs

Cache  hit  ra3os  

Page 34: Extending your applications to the edge with CDNs

Cache  Hit  Ra3o:  Tradi3onal  calcula3on  

1  -­‐     Requests  to  Origin    Total  Requests  

Page 35: Extending your applications to the edge with CDNs

Origin  

Page 36: Extending your applications to the edge with CDNs

Origin  

Cache          

Page 37: Extending your applications to the edge with CDNs

TCP  

Origin  

Cache          

Page 38: Extending your applications to the edge with CDNs

HTTP  

Origin  

Cache          

Page 39: Extending your applications to the edge with CDNs

Origin  

Cache          

HTTP  

Page 40: Extending your applications to the edge with CDNs

Origin  

Cache          

HTTP  

Page 41: Extending your applications to the edge with CDNs

Origin  

Cache          

HTTP  

Page 42: Extending your applications to the edge with CDNs

Origin  

Cache          

HOT   COLD  

Page 43: Extending your applications to the edge with CDNs

Origin  

Cache          

cache  “hit”  

Page 44: Extending your applications to the edge with CDNs

Cache  Hit  Ra3o:  Tradi3onal  calcula3on  

1  -­‐     Requests  to  Origin    Total  Requests  

Page 45: Extending your applications to the edge with CDNs

Isn’t  this  beFer?  

Hits  Total  Requests  

@edge  

Page 46: Extending your applications to the edge with CDNs

Isn’t  this  beFer?  

Hits  Hits  +  Misses  

@edge  

Page 47: Extending your applications to the edge with CDNs

Cache  Hit  Ra3o  

vs.  1  -­‐     Requests  to  Origin    Total  Requests  

Hits  

Hits  +  Misses  @edge  

Page 48: Extending your applications to the edge with CDNs

Cache  Hit  Ra3o  

vs.  1  -­‐     Requests  to  Origin    Total  Requests  

Hits  

Hits  +  Misses  @edge  

Offload  

Page 49: Extending your applications to the edge with CDNs

Cache  Hit  Ra3o  

vs.  1  -­‐     Requests  to  Origin    Total  Requests  

Hits  

Hits  +  Misses  @edge  

Offload   Performance  

Page 50: Extending your applications to the edge with CDNs

Effect  on  long  tail  content  

Page 51: Extending your applications to the edge with CDNs

Long  Tail:  Cacheable  but  seldom  fetched  

Page 52: Extending your applications to the edge with CDNs

Popular   Medium  Tail  (1hr)   Long  tail    (6hr)  

   

   

   

   

Page 53: Extending your applications to the edge with CDNs

Popular   Medium  Tail  (1hr)   Long  tail    (6hr)  

   

   

   

Connect  (median)  

Popular   14msec  

1hr  Tail   15msec  

6hr  Tail   16msec  

   

Page 54: Extending your applications to the edge with CDNs

Popular   Medium  Tail  (1hr)   Long  tail    (6hr)  

Connect  (median)  

Popular   14msec  

1hr  Tail   15msec  

6hr  Tail   16msec  

Page 55: Extending your applications to the edge with CDNs

Popular   Medium  Tail  (1hr)   Long  tail    (6hr)  

Connect  (median)   Wait  (median)  

Popular   14msec   19msec  

1hr  Tail   15msec   26msec  

6hr  Tail   16msec   32msec  

Page 56: Extending your applications to the edge with CDNs

Popular   Medium  Tail  (1hr)   Long  tail    (6hr)  

Connect  (median)   Wait  (median)  

Popular   14msec   19msec  

1hr  Tail   15msec   26msec  

6hr  Tail   16msec   32msec   6,400+  measurements  

77,000+  measurements  

38,000+  measurements  

Page 57: Extending your applications to the edge with CDNs

Popular   Medium  Tail  (1hr)   Long  tail    (6hr)  

Isn’t  this  beFer?  

Page 58: Extending your applications to the edge with CDNs

“Dynamic”  Content  

Page 59: Extending your applications to the edge with CDNs

We’ve  been  told:  

Sta3c  =  Cacheable  

Dynamic  =  Uncacheable  

Page 60: Extending your applications to the edge with CDNs

Cacheable  

Uncacheable  Sta3c  

Dynamic  

How  our  sites  used  to  look  

Page 61: Extending your applications to the edge with CDNs

Cacheable  

Uncacheable  Sta3c  Dynamic  

How  we’re  told  our  sites  look  

Page 62: Extending your applications to the edge with CDNs

Cacheable  

Uncacheable  Sta3c  

Dynamic  

How  our  sites  actually  look  

Event  Driven  

Page 63: Extending your applications to the edge with CDNs

Event-­‐Driven  content:  

Sta3c  for  unpredictable  periods  of  3me    

Page 64: Extending your applications to the edge with CDNs

Three  types  of  content  •  Sta/c  

–  Infrequent  changes,  can  cache  for  a  long  /me  –  Cache-­‐control  headers  are  good  enough  –  Examples:  Images,  javascript  ,  css,  etc  

•  Dynamic  –  Can’t  cache  at  all    -­‐  must  go  to  origin  –  DSA  and  transport  is  key  for  performance  –  Examples:  Logins,  credit  card  transac/ons,  Ajax,  etc  

•  Event-­‐driven  –  Sta/c,  but  unpredictably  –  Cache-­‐control  headers  are  not  good  enough  –  Examples:  That  news  story,  wiki  pages,  user  comments,  sports  scores,  etc  

Page 65: Extending your applications to the edge with CDNs

Three  types  of  content  •  Sta/c  

–  Infrequent  changes,  can  cache  for  a  long  /me  –  Cache-­‐control  headers  are  good  enough  –  Examples:  Images,  javascript  ,  css,  etc  

•  Dynamic  –  Can’t  cache  at  all    -­‐  must  go  to  origin  –  DSA  and  transport  is  key  for  performance  –  Examples:  Logins,  credit  card  transac/ons,  Ajax,  etc  

•  Event-­‐driven  –  Sta/c,  but  unpredictably  –  Cache-­‐control  headers  are  not  good  enough  –  Examples:  That  news  story,  wiki  pages,  user  comments,  sports  scores,  etc  

Page 66: Extending your applications to the edge with CDNs

Three  types  of  content  •  Sta/c  

–  Infrequent  changes,  can  cache  for  a  long  /me  –  Cache-­‐control  headers  are  good  enough  –  Examples:  Images,  javascript  ,  css,  etc  

•  Dynamic  –  Can’t  cache  at  all    -­‐  must  go  to  origin  –  DSA  and  transport  is  key  for  performance  –  Examples:  Logins,  credit  card  transac/ons,  Ajax,  etc  

•  Event-­‐driven  –  Sta/c,  but  unpredictably  –  Cache-­‐control  headers  are  not  good  enough  –  Examples:  That  news  story,  wiki  pages,  user  comments,  sports  scores,  etc  

Page 67: Extending your applications to the edge with CDNs

Caching  event-­‐driven  content  

•  Not  easy  – Classic  CDNs  con/nue  to  consider  it  the  same  as  dynamic  (Bad  caching  or  panic!)  

– Need  the  right  tools  to  cache  •  You  may  not  know  expiry  ahead  of  /me,  but  your  app  knows  when  things  change  

Page 68: Extending your applications to the edge with CDNs

Cache  normally  and  then    

 “uncache”  when  it  changes  

Page 69: Extending your applications to the edge with CDNs

Uncaching!  

•  Purging  – Accessible  through  API  – Granular  •  Dependencies  through  labels,  tags,  or  surrogate  keys  

– Must  be  instantaneous  •  Ex:  news  story,  part  2  

 

Page 70: Extending your applications to the edge with CDNs

Instant  Purge  

•  Enables  caching  of  event-­‐driven  content  –  Can  deal  with  unpredictable  invalida/on  –  As  pages  update/publish,  purge  command  is  sent  to  CDN  

•  Instant?  –  Instant  ≠    12  minutes!  –  Instant  ≠    quick  acknowledgement!  –  <1sec  –  Determinis/c  and  predictable  

Page 71: Extending your applications to the edge with CDNs

Example:  CMS  +  Purge  

Page 72: Extending your applications to the edge with CDNs

WordPress:  Before  

CDN  Node  

Page 73: Extending your applications to the edge with CDNs

WordPress:  Before  

CDN  Node  

Page 74: Extending your applications to the edge with CDNs

WordPress:  Before  

CDN  Node  

Page 75: Extending your applications to the edge with CDNs

WordPress:  Before  

CDN  Node  

Page 76: Extending your applications to the edge with CDNs

WordPress:  Before  

CDN  Node  

Cache  

Page 77: Extending your applications to the edge with CDNs
Page 78: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

Page 79: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

HTTP/1.1 200 OKContent-Type: text/htmlContent-Length: 55,666Cache-Control: Totally Long Time!

Page 80: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

HTTP/1.1 200 OKContent-Type: text/htmlContent-Length: 55,666Cache-Control: Totally Long Time!

Page 81: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

Page 82: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

Page 83: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  PURGE  

Page 84: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  PURGE  

Page 85: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

(Has  to  be  instantaneous!)  

PURGE  

Page 86: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

HTTP/1.1 200 OKContent-Type: text/htmlContent-Length: 55,666Cache-Control: Totally Long Time!

Page 87: Extending your applications to the edge with CDNs

WordPress:  Ajer  

CDN  Node  

Page 88: Extending your applications to the edge with CDNs

Example:  customer1.js  

Page 89: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

(Referer: www.customer1.com)

Page 90: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

Page 91: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 92: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 93: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 94: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

(Ajer  1  min)  

Page 95: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js VALIDATION

If-Modified-Since: Tue, 12 May 2015 19:51:30 GMT

(Ajer  1  min)  

Page 96: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

304 Not Modified

(Ajer  1  min)  

Page 97: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

304 Not Modified

(Ajer  1  min)  

Page 98: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

Page 99: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

Page 100: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60, s-maxage=2592000Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 101: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60, s-maxage=2592000Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 102: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60, s-maxage=2592000Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 103: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60, s-maxage=2592000Last-Modified: Tue, 12 May 2015 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

Page 104: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

(Ajer  1  min)  

Page 105: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

(Ajer  1  min)  

Page 106: Extending your applications to the edge with CDNs

This  happens  many  many  3mes!  (many  many  happy  visitors!)  

Page 107: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

Customer1  changes  config  

(Ajer  1  min)  

Page 108: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  PURGE  customer1.js  

Customer1  changes  config  

(Ajer  1  min)  

Page 109: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  PURGE  customer1.js  

Customer1  changes  config  

(Ajer  1  min)  

Page 110: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

(Ajer  1  min)  

Page 111: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://www.3rdparty.com/customer1.js

HTTP/1.1 200 OKCache-Control: max-age=60, s-maxage=2592000Last-Modified: Wed, 24 Sep 2014 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

(Ajer  1  min)  

Page 112: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 200 OKCache-Control: max-age=60, s-maxage=2592000Last-Modified: Wed, 24 Sep 2014 19:51:30 GMTContent-Type: application/javascriptDate: Thu, 25 Sep 2014 12:22:20 GMTServer: ApacheContent-Length: 7835

http://www.3rdparty.com/customer1.js

(Ajer  1  min)  

Page 113: Extending your applications to the edge with CDNs

Control  

Visibility  

Cacheability  

Page 114: Extending your applications to the edge with CDNs

Programmability  

•  Granular  Invalida/on  API  •  Configura/on  API  •  Logic  at  the  Edge  •  All  must  be  instantaneous  and  real  /me  

Page 115: Extending your applications to the edge with CDNs
Page 116: Extending your applications to the edge with CDNs

Control  at  the  Edge  

•  Moving  app  logic  to  the  edge  •  Ex:  VCL  (Varnish  Configura/on  Language)  – Script-­‐like  configura/on  for  func/onality  at  the  edge  

•  Any  mechanism  offered  by  CDN  to  let  you  do  stuff  at  the  edge  is  good  

Page 117: Extending your applications to the edge with CDNs

Logic  at  the  Edge:  Examples    •  Generate  content  at  the  edge  •  HTTP  header  manipula/on  •  Origin  selec/on  •  Caching  rules  •  Geo-­‐IP  rules  •  Forcing  SSL  •  Serving  stale  content    

–  stale-­‐while-­‐revalidate,  stale-­‐while-­‐error  •  Etc…  

Page 118: Extending your applications to the edge with CDNs

Example:  Edge-­‐generated  Content  

Page 119: Extending your applications to the edge with CDNs

JSON  Data  Center  ID  

CDN  Node  

Origin  http://www.site.com/which_datacenter.js

Page 120: Extending your applications to the edge with CDNs

JSON  Data  Center  ID  

CDN  Node  

Origin  

{ ‘datacenter’ : ‘LAX’ }

http://www.site.com/which_datacenter.js

Page 121: Extending your applications to the edge with CDNs

VCL  Snippet  

Page 122: Extending your applications to the edge with CDNs

JSONP  Geo  IP  

CDN  Node  

Origin  

myFunction({ “city” : “New York”, “state”: “New York”, “country”: “United States”, “ip”: “173.18.14.237”});

http://www.site.com/geo_ip.js?jsonp=myFunction

Page 123: Extending your applications to the edge with CDNs

JSONP  Geo  IP  

CDN  Node  

Origin  

myFunction({ “city” : “New York”, “state”: “New York”, “country”: “United States”, “ip”: “173.18.14.237”});

http://www.site.com/geo_ip.js?jsonp=myFunction

Page 124: Extending your applications to the edge with CDNs

JSONP  Geo  IP  

CDN  Node  

Origin  

somethingElse({ “city” : “New York”, “state”: “New York”, “country”: “United States”, “ip”: “173.18.14.237”});

http://www.site.com/geo_ip.js?jsonp=somethingElse

Page 125: Extending your applications to the edge with CDNs

Control  

Visibility  

Cacheability  

Page 126: Extending your applications to the edge with CDNs

Real-­‐3me  Analy3cs  

•  Stats  API  •  Network  stats  •  HTTP  stats  (status  codes,  etc)  •  Caching  stats  (hits,  misses,  errors,  etc)  •  All  have  to  be  real-­‐/me  – Historic  data  is  also  a  must  for  long  term  stats  analysis  

Page 127: Extending your applications to the edge with CDNs

Logging  

•  Real  /me!  •  Log  streaming  – To  any  logging  des/na/on  endpoint  – Ex:  S3,  FTP,  syslog,  etc  

Page 128: Extending your applications to the edge with CDNs

Example:  Beacon  Termina3on  at  the  Edge  

Page 129: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

Log  Analysis  

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 130: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

Log  Analysis  

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 131: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

Log  Analysis  

HTTP/1.1 200 OKPragma: no-cacheExpires: Wed, 19 Apr 2000 11:43:00 GMTCache-Control: no-cache, no-storeLast-Modified: Wed, 21 Jan 2004 19:51:30 GMTContent-Type: image/gifDate: Fri, 20 Jun 2014 12:22:20 GMTServer: ApacheContent-Length: 35

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 132: Extending your applications to the edge with CDNs

Before  

CDN  Node  

Origin  

Log  Analysis  

HTTP/1.1 200 OKPragma: no-cacheExpires: Wed, 19 Apr 2000 11:43:00 GMTCache-Control: no-cache, no-storeLast-Modified: Wed, 21 Jan 2004 19:51:30 GMTContent-Type: image/gifDate: Fri, 20 Jun 2014 12:22:20 GMTServer: ApacheContent-Length: 35

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 133: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 134: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 200 OKPragma: no-cacheExpires: Wed, 19 Apr 2000 11:43:00 GMTCache-Control: no-cache, no-storeLast-Modified: Wed, 21 Jan 2004 19:51:30 GMTContent-Type: image/gifDate: Fri, 20 Jun 2014 12:22:20 GMTServer: ApacheContent-Length: 35

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 135: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

HTTP/1.1 204 No ContentDate: Sat, 21 Jun 2014 23:21:12 GMTServer: Awesome ServerContent-Length: 0

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 136: Extending your applications to the edge with CDNs

Ajer  

CDN  Node  

Origin  

Syslog  /  S3  /  FTP/etc  

http://collector.site.com/beacon.img?a=1&b=2&c=3

Page 137: Extending your applications to the edge with CDNs

Summary  

•  CDNs  should  be  an  extension  of  your  applica/ons:  –  Flexible  caching,  predictable  edge  caching,  and  instant  purging  to  un-­‐cache!  

–  Control  at  the  edge  –  Real-­‐/me  visibility  and  analy/cs  

•  Full  real-­‐/me  programma/c  interface  is  a  must    

Page 138: Extending your applications to the edge with CDNs

Thank  you!  

[email protected]