SlideShare a Scribd company logo
1 of 138
Download to read offline
Extending	
  Applica/ons	
  To	
  The	
  Edge	
  
With	
  CDNs	
  
Hooman	
  Behesh/,	
  VP	
  Technology	
  
Webperf	
  meetup	
  NYC	
  –	
  May	
  12	
  2015	
  
What	
  is	
  a	
  CDN	
  
•  Global	
  network	
  of	
  HTTP	
  caches	
  
– Get	
  content	
  closer	
  to	
  users	
  
•  Performance	
  benefits	
  
•  offload	
  
In	
  the	
  past…	
  
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	
  
Cacheable	
  
Uncacheable	
  
Sta3c	
  Dynamic	
  
How	
  classic	
  CDNs	
  look	
  at	
  your	
  content	
  
Cache-Control: max-age=31536000
Classic	
  CDNs:	
  dynamic	
  content	
  
•  Focused	
  on	
  delivery:	
  transport	
  op/miza/on	
  
But	
  some3mes…	
  
I	
  know	
  you’re	
  calling	
  it	
  
dynamic,	
  but	
  it’s	
  kind	
  
of	
  sta3c	
  some3mes	
  
I	
  know	
  you’re	
  calling	
  it	
  
dynamic,	
  but	
  it’s	
  kind	
  
of	
  sta3c	
  some3mes	
  
That’s	
  cool,	
  how	
  long	
  
is	
  it	
  sta3c	
  for?	
  
That’s	
  cool,	
  how	
  long	
  
is	
  it	
  sta3c	
  for?	
  Some3mes	
  a	
  liFle	
  bit,	
  
some3mes	
  a	
  lot	
  
Some3mes	
  a	
  liFle	
  bit,	
  
some3mes	
  a	
  lot	
   Neat!	
  
Some3mes	
  a	
  liFle	
  bit,	
  
some3mes	
  a	
  lot	
   You	
  look	
  great	
  today!	
  
You	
  look	
  great	
  today!	
  
Don’t	
  change	
  the	
  
subject!	
  	
  How	
  do	
  I	
  
cache	
  it?	
  
Don’t	
  change	
  the	
  
subject!	
  	
  How	
  do	
  I	
  
cache	
  it?	
  
Cache	
  it	
  for	
  half	
  an	
  
hour?	
  
Cache	
  it	
  for	
  half	
  an	
  
hour?	
  Some3mes	
  it	
  changes	
  
much	
  faster	
  
Some3mes	
  it	
  changes	
  
much	
  faster	
  
Cache	
  it	
  for	
  10	
  
minutes?	
  
Cache	
  it	
  for	
  10	
  
minutes?	
  Are	
  you	
  just	
  guessing	
  
right	
  now?	
  
Are	
  you	
  just	
  guessing	
  
right	
  now?	
  
Just	
  trying	
  to	
  figure	
  
out	
  your	
  comfort	
  
level	
  with	
  mistakes!	
  
Expiry	
  guessing!	
  
Terrible	
  Caching	
  
Terrible	
  Caching	
  
Terrible	
  Anxiety	
  
or	
  
(ex:	
  news	
  story)	
  
Things	
  are	
  different	
  today	
  
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	
  
	
  
What	
  does	
  this	
  all	
  mean?	
  
Control	
  
Visibility	
  
Cacheability	
  
Control	
  
Visibility	
  
Cacheability	
  
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!	
  
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!	
  
Cache	
  hit	
  ra3os	
  
Cache	
  Hit	
  Ra3o:	
  Tradi3onal	
  calcula3on	
  
1	
  -­‐	
  	
  
Requests	
  to	
  Origin	
  	
  
Total	
  Requests	
  
Origin	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
TCP	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
HTTP	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
HTTP	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
HTTP	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
HTTP	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
HOT	
   COLD	
  
Origin	
  
Cache	
  
	
  
	
  
	
  
	
  
cache	
  “hit”	
  
Cache	
  Hit	
  Ra3o:	
  Tradi3onal	
  calcula3on	
  
1	
  -­‐	
  	
  
Requests	
  to	
  Origin	
  	
  
Total	
  Requests	
  
Isn’t	
  this	
  beFer?	
  
Hits	
  
Total	
  Requests	
  
@edge	
  
Isn’t	
  this	
  beFer?	
  
Hits	
  
Hits	
  +	
  Misses	
  
@edge	
  
Cache	
  Hit	
  Ra3o	
  
vs.	
  1	
  -­‐	
  	
  Requests	
  to	
  Origin	
  	
  
Total	
  Requests	
  
Hits	
  
Hits	
  +	
  Misses	
  
@edge	
  
Cache	
  Hit	
  Ra3o	
  
vs.	
  1	
  -­‐	
  	
  Requests	
  to	
  Origin	
  	
  
Total	
  Requests	
  
Hits	
  
Hits	
  +	
  Misses	
  
@edge	
  
Offload	
  
Cache	
  Hit	
  Ra3o	
  
vs.	
  1	
  -­‐	
  	
  Requests	
  to	
  Origin	
  	
  
Total	
  Requests	
  
Hits	
  
Hits	
  +	
  Misses	
  
@edge	
  
Offload	
   Performance	
  
Effect	
  on	
  long	
  tail	
  content	
  
Long	
  Tail:	
  Cacheable	
  but	
  seldom	
  fetched	
  
Popular	
   Medium	
  Tail	
  (1hr)	
   Long	
  tail	
  	
  (6hr)	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Popular	
   Medium	
  Tail	
  (1hr)	
   Long	
  tail	
  	
  (6hr)	
  
	
  
	
  
	
  
	
  
	
  
	
  
Connect	
  (median)	
  
Popular	
   14msec	
  
1hr	
  Tail	
   15msec	
  
6hr	
  Tail	
   16msec	
  
	
  
	
  
Popular	
   Medium	
  Tail	
  (1hr)	
   Long	
  tail	
  	
  (6hr)	
  
Connect	
  (median)	
  
Popular	
   14msec	
  
1hr	
  Tail	
   15msec	
  
6hr	
  Tail	
   16msec	
  
Popular	
   Medium	
  Tail	
  (1hr)	
   Long	
  tail	
  	
  (6hr)	
  
Connect	
  (median)	
   Wait	
  (median)	
  
Popular	
   14msec	
   19msec	
  
1hr	
  Tail	
   15msec	
   26msec	
  
6hr	
  Tail	
   16msec	
   32msec	
  
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	
  
Popular	
   Medium	
  Tail	
  (1hr)	
   Long	
  tail	
  	
  (6hr)	
  
Isn’t	
  this	
  beFer?	
  
“Dynamic”	
  Content	
  
We’ve	
  been	
  told:	
  
Sta3c	
  =	
  Cacheable	
  
Dynamic	
  =	
  Uncacheable	
  
Cacheable	
  
Uncacheable	
  
Sta3c	
  
Dynamic	
  
How	
  our	
  sites	
  used	
  to	
  look	
  
Cacheable	
  
Uncacheable	
  
Sta3c	
  Dynamic	
  
How	
  we’re	
  told	
  our	
  sites	
  look	
  
Cacheable	
  
Uncacheable	
  
Sta3c	
  
Dynamic	
  
How	
  our	
  sites	
  actually	
  look	
  
Event	
  
Driven	
  
Event-­‐Driven	
  content:	
  
Sta3c	
  for	
  unpredictable	
  periods	
  of	
  3me	
  
	
  
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	
  
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	
  
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	
  
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	
  
Cache	
  normally	
  and	
  then	
  
	
  
	
  “uncache”	
  when	
  it	
  changes	
  
Uncaching!	
  
•  Purging	
  
– Accessible	
  through	
  API	
  
– Granular	
  
•  Dependencies	
  through	
  labels,	
  tags,	
  or	
  surrogate	
  keys	
  
– Must	
  be	
  instantaneous	
  
•  Ex:	
  news	
  story,	
  part	
  2	
  
	
  
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	
  
Example:	
  
CMS	
  +	
  Purge	
  
WordPress:	
  Before	
  
CDN	
  Node	
  
WordPress:	
  Before	
  
CDN	
  Node	
  
WordPress:	
  Before	
  
CDN	
  Node	
  
WordPress:	
  Before	
  
CDN	
  Node	
  
WordPress:	
  Before	
  
CDN	
  Node	
  
Cache	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 55,666
Cache-Control: Totally Long Time!
WordPress:	
  Ajer	
  
CDN	
  Node	
  
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 55,666
Cache-Control: Totally Long Time!
WordPress:	
  Ajer	
  
CDN	
  Node	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
PURGE	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
PURGE	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
(Has	
  to	
  be	
  instantaneous!)	
  
PURGE	
  
WordPress:	
  Ajer	
  
CDN	
  Node	
  
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 55,666
Cache-Control: Totally Long Time!
WordPress:	
  Ajer	
  
CDN	
  Node	
  
Example:	
  
customer1.js	
  
Before	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
(Referer: www.customer1.com)
Before	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
Before	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Before	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Before	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Before	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
(Ajer	
  1	
  min)	
  
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)	
  
Before	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
304 Not Modified
(Ajer	
  1	
  min)	
  
Before	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
304 Not Modified
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60, s-maxage=2592000
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60, s-maxage=2592000
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60, s-maxage=2592000
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60, s-maxage=2592000
Last-Modified: Tue, 12 May 2015 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
(Ajer	
  1	
  min)	
  
This	
  happens	
  many	
  many	
  3mes!	
  
(many	
  many	
  happy	
  visitors!)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
Customer1	
  
changes	
  config	
  
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
PURGE	
  customer1.js	
  
Customer1	
  
changes	
  config	
  
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
PURGE	
  customer1.js	
  
Customer1	
  
changes	
  config	
  
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://www.3rdparty.com/customer1.js
HTTP/1.1 200 OK
Cache-Control: max-age=60, s-maxage=2592000
Last-Modified: Wed, 24 Sep 2014 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
(Ajer	
  1	
  min)	
  
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Cache-Control: max-age=60, s-maxage=2592000
Last-Modified: Wed, 24 Sep 2014 19:51:30 GMT
Content-Type: application/javascript
Date: Thu, 25 Sep 2014 12:22:20 GMT
Server: Apache
Content-Length: 7835
http://www.3rdparty.com/customer1.js
(Ajer	
  1	
  min)	
  
Control	
  
Visibility	
  
Cacheability	
  
Programmability	
  
•  Granular	
  Invalida/on	
  API	
  
•  Configura/on	
  API	
  
•  Logic	
  at	
  the	
  Edge	
  
•  All	
  must	
  be	
  instantaneous	
  and	
  real	
  /me	
  
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	
  
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…	
  
Example:	
  
Edge-­‐generated	
  Content	
  
JSON	
  Data	
  Center	
  ID	
  
CDN	
  Node	
  
Origin	
  
http://www.site.com/which_datacenter.js
JSON	
  Data	
  Center	
  ID	
  
CDN	
  Node	
  
Origin	
  
{ ‘datacenter’ : ‘LAX’ }
http://www.site.com/which_datacenter.js
VCL	
  Snippet	
  
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
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
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
Control	
  
Visibility	
  
Cacheability	
  
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	
  
Logging	
  
•  Real	
  /me!	
  
•  Log	
  streaming	
  
– To	
  any	
  logging	
  des/na/on	
  endpoint	
  
– Ex:	
  S3,	
  FTP,	
  syslog,	
  etc	
  
Example:	
  
Beacon	
  Termina3on	
  at	
  the	
  Edge	
  
Before	
  
CDN	
  Node	
  
Origin	
  
Log	
  Analysis	
  
http://collector.site.com/beacon.img?a=1&b=2&c=3
Before	
  
CDN	
  Node	
  
Origin	
  
Log	
  Analysis	
  
http://collector.site.com/beacon.img?a=1&b=2&c=3
Before	
  
CDN	
  Node	
  
Origin	
  
Log	
  Analysis	
  
HTTP/1.1 200 OK
Pragma: no-cache
Expires: Wed, 19 Apr 2000 11:43:00 GMT
Cache-Control: no-cache, no-store
Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT
Content-Type: image/gif
Date: Fri, 20 Jun 2014 12:22:20 GMT
Server: Apache
Content-Length: 35
http://collector.site.com/beacon.img?a=1&b=2&c=3
Before	
  
CDN	
  Node	
  
Origin	
  
Log	
  Analysis	
  
HTTP/1.1 200 OK
Pragma: no-cache
Expires: Wed, 19 Apr 2000 11:43:00 GMT
Cache-Control: no-cache, no-store
Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT
Content-Type: image/gif
Date: Fri, 20 Jun 2014 12:22:20 GMT
Server: Apache
Content-Length: 35
http://collector.site.com/beacon.img?a=1&b=2&c=3
Ajer	
  
CDN	
  Node	
  
Origin	
  
http://collector.site.com/beacon.img?a=1&b=2&c=3
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 200 OK
Pragma: no-cache
Expires: Wed, 19 Apr 2000 11:43:00 GMT
Cache-Control: no-cache, no-store
Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT
Content-Type: image/gif
Date: Fri, 20 Jun 2014 12:22:20 GMT
Server: Apache
Content-Length: 35
http://collector.site.com/beacon.img?a=1&b=2&c=3
Ajer	
  
CDN	
  Node	
  
Origin	
  
HTTP/1.1 204 No Content
Date: Sat, 21 Jun 2014 23:21:12 GMT
Server: Awesome Server
Content-Length: 0
http://collector.site.com/beacon.img?a=1&b=2&c=3
Ajer	
  
CDN	
  Node	
  
Origin	
  
Syslog	
  /	
  S3	
  /	
  FTP/etc	
  
http://collector.site.com/beacon.img?a=1&b=2&c=3
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	
  
	
  
Thank	
  you!	
  
hooman@fastly.com	
  

More Related Content

What's hot

Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneMaarten Balliauw
 
designing distributed scalable and reliable systems
designing distributed scalable and reliable systemsdesigning distributed scalable and reliable systems
designing distributed scalable and reliable systemsMauro Servienti
 
Top 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsTop 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsmarkgrover
 
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...DataStax Academy
 

What's hot (7)

Fraud Detection Architecture
Fraud Detection ArchitectureFraud Detection Architecture
Fraud Detection Architecture
 
Cassandra Metrics
Cassandra MetricsCassandra Metrics
Cassandra Metrics
 
Cisco global site selector
Cisco global site selectorCisco global site selector
Cisco global site selector
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
 
designing distributed scalable and reliable systems
designing distributed scalable and reliable systemsdesigning distributed scalable and reliable systems
designing distributed scalable and reliable systems
 
Top 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applicationsTop 5 mistakes when writing Spark applications
Top 5 mistakes when writing Spark applications
 
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
C* Summit 2013: Real-Time Big Data with Storm, Cassandra, and In-Memory Compu...
 

Viewers also liked

The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2
The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2
The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2Jennifer Dopazo
 
From Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New Clear
From Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New ClearFrom Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New Clear
From Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New Cleargoodfriday
 
Apres padrao mrsa_1_q10_eng
Apres padrao mrsa_1_q10_engApres padrao mrsa_1_q10_eng
Apres padrao mrsa_1_q10_engMagnesita_ri
 
Case Study Risk&Rewards
Case Study Risk&RewardsCase Study Risk&Rewards
Case Study Risk&RewardsFM Signal
 
Why infographics are important in digital marketing - EBriks Infotech
Why infographics are important in  digital marketing  - EBriks InfotechWhy infographics are important in  digital marketing  - EBriks Infotech
Why infographics are important in digital marketing - EBriks InfotechEBriks Infotech Pvt. Ltd.
 
Visual Thinking4267
Visual Thinking4267Visual Thinking4267
Visual Thinking4267ramrag2001
 

Viewers also liked (8)

The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2
The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2
The Branding Lounge: Creating a Visual GuidelineThe branding-lounge-session-2
 
From Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New Clear
From Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New ClearFrom Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New Clear
From Long Tail to Fuzzy Tale: Why "Fuzzy" Is the New Clear
 
Apres padrao mrsa_1_q10_eng
Apres padrao mrsa_1_q10_engApres padrao mrsa_1_q10_eng
Apres padrao mrsa_1_q10_eng
 
Case Study Risk&Rewards
Case Study Risk&RewardsCase Study Risk&Rewards
Case Study Risk&Rewards
 
Capital humano
Capital humanoCapital humano
Capital humano
 
Why infographics are important in digital marketing - EBriks Infotech
Why infographics are important in  digital marketing  - EBriks InfotechWhy infographics are important in  digital marketing  - EBriks Infotech
Why infographics are important in digital marketing - EBriks Infotech
 
Visual Thinking4267
Visual Thinking4267Visual Thinking4267
Visual Thinking4267
 
Apresentacaoo padrao en
Apresentacaoo padrao enApresentacaoo padrao en
Apresentacaoo padrao en
 

Similar to Extending Applications to the Edge with CDNs

Hadoop Application Architectures - Fraud Detection
Hadoop Application Architectures - Fraud  DetectionHadoop Application Architectures - Fraud  Detection
Hadoop Application Architectures - Fraud Detectionhadooparchbook
 
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 CDNsSalesforce Developers
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialhadooparchbook
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialhadooparchbook
 
BigData & CDN - OOP2011 (Pavlo Baron)
BigData & CDN - OOP2011 (Pavlo Baron)BigData & CDN - OOP2011 (Pavlo Baron)
BigData & CDN - OOP2011 (Pavlo Baron)Pavlo Baron
 
Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Fastly
 
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 ...Amazon Web Services
 
Architecting applications with Hadoop - Fraud Detection
Architecting applications with Hadoop - Fraud DetectionArchitecting applications with Hadoop - Fraud Detection
Architecting applications with Hadoop - Fraud Detectionhadooparchbook
 
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Amazon Web Services
 
Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022
Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022
Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022HostedbyConfluent
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibrePablo Moretti
 
AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...
AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...
AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...Amazon Web Services
 
Spreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until ToldSpreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until ToldMartin Breest
 
Events and microservices
Events and microservicesEvents and microservices
Events and microservicesSaul Caganoff
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge cachingMichael May
 
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic ContentCaching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic ContentFastly
 
Traveloka's data journey — Traveloka data meetup #2
Traveloka's data journey — Traveloka data meetup #2Traveloka's data journey — Traveloka data meetup #2
Traveloka's data journey — Traveloka data meetup #2Traveloka
 
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...Amazon Web Services
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayC4Media
 
Elastic Data Analytics Platform @Datadog
Elastic Data Analytics Platform @DatadogElastic Data Analytics Platform @Datadog
Elastic Data Analytics Platform @DatadogC4Media
 

Similar to Extending Applications to the Edge with CDNs (20)

Hadoop Application Architectures - Fraud Detection
Hadoop Application Architectures - Fraud  DetectionHadoop Application Architectures - Fraud  Detection
Hadoop Application Architectures - Fraud Detection
 
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
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorial
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorial
 
BigData & CDN - OOP2011 (Pavlo Baron)
BigData & CDN - OOP2011 (Pavlo Baron)BigData & CDN - OOP2011 (Pavlo Baron)
BigData & CDN - OOP2011 (Pavlo Baron)
 
Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]Caching the Uncacheable [Long Version]
Caching the Uncacheable [Long Version]
 
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 ...
 
Architecting applications with Hadoop - Fraud Detection
Architecting applications with Hadoop - Fraud DetectionArchitecting applications with Hadoop - Fraud Detection
Architecting applications with Hadoop - Fraud Detection
 
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
Dynamic Content Acceleration: Amazon CloudFront and Amazon Route 53 (ARC309) ...
 
Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022
Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022
Knock Knock, Who’s There? With Justin Chen and Dhruv Jauhar | Current 2022
 
Web performance optimization - MercadoLibre
Web performance optimization - MercadoLibreWeb performance optimization - MercadoLibre
Web performance optimization - MercadoLibre
 
AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...
AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...
AWS Storage and Database Architecture Best Practices (DAT203) | AWS re:Invent...
 
Spreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until ToldSpreadshirt Techcamp 2018 - Hold until Told
Spreadshirt Techcamp 2018 - Hold until Told
 
Events and microservices
Events and microservicesEvents and microservices
Events and microservices
 
Accelerating Rails with edge caching
Accelerating Rails with edge cachingAccelerating Rails with edge caching
Accelerating Rails with edge caching
 
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic ContentCaching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
Caching the Uncacheable: Leveraging Your CDN to Cache Dynamic Content
 
Traveloka's data journey — Traveloka data meetup #2
Traveloka's data journey — Traveloka data meetup #2Traveloka's data journey — Traveloka data meetup #2
Traveloka's data journey — Traveloka data meetup #2
 
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
AWS re:Invent 2016: Case Study: How Startups Like Smartsheet and Quantcast Ac...
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Elastic Data Analytics Platform @Datadog
Elastic Data Analytics Platform @DatadogElastic Data Analytics Platform @Datadog
Elastic Data Analytics Platform @Datadog
 

More from SergeyChernyshev

Capturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiCapturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiSergeyChernyshev
 
Managing application performance by Kwame Thomison
Managing application performance by Kwame ThomisonManaging application performance by Kwame Thomison
Managing application performance by Kwame ThomisonSergeyChernyshev
 
Fastest request is never made
Fastest request is never madeFastest request is never made
Fastest request is never madeSergeyChernyshev
 
Designing speed with progressive enhancement
Designing speed with progressive enhancementDesigning speed with progressive enhancement
Designing speed with progressive enhancementSergeyChernyshev
 
Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016SergeyChernyshev
 
What we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceWhat we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceSergeyChernyshev
 
Scalability vs. Performance
Scalability vs. PerformanceScalability vs. Performance
Scalability vs. PerformanceSergeyChernyshev
 
Web performance: beyond load testing
Web performance: beyond load testingWeb performance: beyond load testing
Web performance: beyond load testingSergeyChernyshev
 
Introduction to web performance @ IEEE
Introduction to web performance @ IEEEIntroduction to web performance @ IEEE
Introduction to web performance @ IEEESergeyChernyshev
 
Introduction to Web Performance
Introduction to Web PerformanceIntroduction to Web Performance
Introduction to Web PerformanceSergeyChernyshev
 
Performance anti patterns in ajax applications
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applicationsSergeyChernyshev
 
Keeping track of your performance using Show Slow
Keeping track of your performance using Show SlowKeeping track of your performance using Show Slow
Keeping track of your performance using Show SlowSergeyChernyshev
 
Keeping track of your performance using show slow
Keeping track of your performance using show slowKeeping track of your performance using show slow
Keeping track of your performance using show slowSergeyChernyshev
 
Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2SergeyChernyshev
 
Php Code Profiling Using X Debug
Php Code Profiling Using X DebugPhp Code Profiling Using X Debug
Php Code Profiling Using X DebugSergeyChernyshev
 

More from SergeyChernyshev (20)

Capturing speed of user experience using user timing api
Capturing speed of user experience using user timing apiCapturing speed of user experience using user timing api
Capturing speed of user experience using user timing api
 
Managing application performance by Kwame Thomison
Managing application performance by Kwame ThomisonManaging application performance by Kwame Thomison
Managing application performance by Kwame Thomison
 
Fastest request is never made
Fastest request is never madeFastest request is never made
Fastest request is never made
 
Designing speed with progressive enhancement
Designing speed with progressive enhancementDesigning speed with progressive enhancement
Designing speed with progressive enhancement
 
Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016Web performance tools @ WebPerf.camp 2016
Web performance tools @ WebPerf.camp 2016
 
Speed is feature #1
Speed is feature #1Speed is feature #1
Speed is feature #1
 
Tools of the trade 2014
Tools of the trade 2014Tools of the trade 2014
Tools of the trade 2014
 
What we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and PerformanceWhat we can learn from CDNs about Web Development, Deployment, and Performance
What we can learn from CDNs about Web Development, Deployment, and Performance
 
Scalability vs. Performance
Scalability vs. PerformanceScalability vs. Performance
Scalability vs. Performance
 
Web performance: beyond load testing
Web performance: beyond load testingWeb performance: beyond load testing
Web performance: beyond load testing
 
Introduction to web performance @ IEEE
Introduction to web performance @ IEEEIntroduction to web performance @ IEEE
Introduction to web performance @ IEEE
 
Introduction to Web Performance
Introduction to Web PerformanceIntroduction to Web Performance
Introduction to Web Performance
 
Performance anti patterns in ajax applications
Performance anti patterns in ajax applicationsPerformance anti patterns in ajax applications
Performance anti patterns in ajax applications
 
Taming 3rd party content
Taming 3rd party contentTaming 3rd party content
Taming 3rd party content
 
Velocity 2010 review
Velocity 2010 reviewVelocity 2010 review
Velocity 2010 review
 
Keeping track of your performance using Show Slow
Keeping track of your performance using Show SlowKeeping track of your performance using Show Slow
Keeping track of your performance using Show Slow
 
Keeping track of your performance using show slow
Keeping track of your performance using show slowKeeping track of your performance using show slow
Keeping track of your performance using show slow
 
In Search of Speed
In Search of SpeedIn Search of Speed
In Search of Speed
 
Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2Building your own CDN using Amazon EC2
Building your own CDN using Amazon EC2
 
Php Code Profiling Using X Debug
Php Code Profiling Using X DebugPhp Code Profiling Using X Debug
Php Code Profiling Using X Debug
 

Recently uploaded

Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleanscorenetworkseo
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Sonam Pathan
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一z xss
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationMarko4394
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxeditsforyah
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 

Recently uploaded (20)

Elevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New OrleansElevate Your Business with Our IT Expertise in New Orleans
Elevate Your Business with Our IT Expertise in New Orleans
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
Call Girls In The Ocean Pearl Retreat Hotel New Delhi 9873777170
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
办理(UofR毕业证书)罗切斯特大学毕业证成绩单原版一比一
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
NSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentationNSX-T and Service Interfaces presentation
NSX-T and Service Interfaces presentation
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
Q4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptxQ4-1-Illustrating-Hypothesis-Testing.pptx
Q4-1-Illustrating-Hypothesis-Testing.pptx
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 

Extending Applications to the Edge with CDNs

  • 1. Extending  Applica/ons  To  The  Edge   With  CDNs   Hooman  Behesh/,  VP  Technology   Webperf  meetup  NYC  –  May  12  2015  
  • 2. What  is  a  CDN   •  Global  network  of  HTTP  caches   – Get  content  closer  to  users   •  Performance  benefits   •  offload  
  • 3.
  • 4.
  • 5.
  • 7. 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  
  • 8. Cacheable   Uncacheable   Sta3c  Dynamic   How  classic  CDNs  look  at  your  content  
  • 10. Classic  CDNs:  dynamic  content   •  Focused  on  delivery:  transport  op/miza/on  
  • 12. I  know  you’re  calling  it   dynamic,  but  it’s  kind   of  sta3c  some3mes  
  • 13. I  know  you’re  calling  it   dynamic,  but  it’s  kind   of  sta3c  some3mes   That’s  cool,  how  long   is  it  sta3c  for?  
  • 14. That’s  cool,  how  long   is  it  sta3c  for?  Some3mes  a  liFle  bit,   some3mes  a  lot  
  • 15. Some3mes  a  liFle  bit,   some3mes  a  lot   Neat!  
  • 16. Some3mes  a  liFle  bit,   some3mes  a  lot   You  look  great  today!  
  • 17. You  look  great  today!   Don’t  change  the   subject!    How  do  I   cache  it?  
  • 18. Don’t  change  the   subject!    How  do  I   cache  it?   Cache  it  for  half  an   hour?  
  • 19. Cache  it  for  half  an   hour?  Some3mes  it  changes   much  faster  
  • 20. Some3mes  it  changes   much  faster   Cache  it  for  10   minutes?  
  • 21. Cache  it  for  10   minutes?  Are  you  just  guessing   right  now?  
  • 22. Are  you  just  guessing   right  now?   Just  trying  to  figure   out  your  comfort   level  with  mistakes!  
  • 25. Terrible  Caching   Terrible  Anxiety   or   (ex:  news  story)  
  • 27. 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    
  • 28. What  does  this  all  mean?  
  • 31. 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!  
  • 32. 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!  
  • 34. Cache  Hit  Ra3o:  Tradi3onal  calcula3on   1  -­‐     Requests  to  Origin     Total  Requests  
  • 36. Origin   Cache          
  • 37. TCP   Origin   Cache          
  • 38. HTTP   Origin   Cache          
  • 39. Origin   Cache           HTTP  
  • 40. Origin   Cache           HTTP  
  • 41. Origin   Cache           HTTP  
  • 42. Origin   Cache           HOT   COLD  
  • 43. Origin   Cache           cache  “hit”  
  • 44. Cache  Hit  Ra3o:  Tradi3onal  calcula3on   1  -­‐     Requests  to  Origin     Total  Requests  
  • 45. Isn’t  this  beFer?   Hits   Total  Requests   @edge  
  • 46. Isn’t  this  beFer?   Hits   Hits  +  Misses   @edge  
  • 47. Cache  Hit  Ra3o   vs.  1  -­‐    Requests  to  Origin     Total  Requests   Hits   Hits  +  Misses   @edge  
  • 48. Cache  Hit  Ra3o   vs.  1  -­‐    Requests  to  Origin     Total  Requests   Hits   Hits  +  Misses   @edge   Offload  
  • 49. Cache  Hit  Ra3o   vs.  1  -­‐    Requests  to  Origin     Total  Requests   Hits   Hits  +  Misses   @edge   Offload   Performance  
  • 50. Effect  on  long  tail  content  
  • 51. Long  Tail:  Cacheable  but  seldom  fetched  
  • 52. Popular   Medium  Tail  (1hr)   Long  tail    (6hr)                  
  • 53. Popular   Medium  Tail  (1hr)   Long  tail    (6hr)               Connect  (median)   Popular   14msec   1hr  Tail   15msec   6hr  Tail   16msec      
  • 54. Popular   Medium  Tail  (1hr)   Long  tail    (6hr)   Connect  (median)   Popular   14msec   1hr  Tail   15msec   6hr  Tail   16msec  
  • 55. Popular   Medium  Tail  (1hr)   Long  tail    (6hr)   Connect  (median)   Wait  (median)   Popular   14msec   19msec   1hr  Tail   15msec   26msec   6hr  Tail   16msec   32msec  
  • 56. 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  
  • 57. Popular   Medium  Tail  (1hr)   Long  tail    (6hr)   Isn’t  this  beFer?  
  • 59. We’ve  been  told:   Sta3c  =  Cacheable   Dynamic  =  Uncacheable  
  • 60. Cacheable   Uncacheable   Sta3c   Dynamic   How  our  sites  used  to  look  
  • 61. Cacheable   Uncacheable   Sta3c  Dynamic   How  we’re  told  our  sites  look  
  • 62. Cacheable   Uncacheable   Sta3c   Dynamic   How  our  sites  actually  look   Event   Driven  
  • 63. Event-­‐Driven  content:   Sta3c  for  unpredictable  periods  of  3me    
  • 64. 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  
  • 65. 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  
  • 66. 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  
  • 67. 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  
  • 68. Cache  normally  and  then      “uncache”  when  it  changes  
  • 69. Uncaching!   •  Purging   – Accessible  through  API   – Granular   •  Dependencies  through  labels,  tags,  or  surrogate  keys   – Must  be  instantaneous   •  Ex:  news  story,  part  2    
  • 70. 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  
  • 71. Example:   CMS  +  Purge  
  • 76. WordPress:  Before   CDN  Node   Cache  
  • 77.
  • 79. WordPress:  Ajer   CDN  Node   HTTP/1.1 200 OK Content-Type: text/html Content-Length: 55,666 Cache-Control: Totally Long Time!
  • 80. WordPress:  Ajer   CDN  Node   HTTP/1.1 200 OK Content-Type: text/html Content-Length: 55,666 Cache-Control: Totally Long Time!
  • 83. WordPress:  Ajer   CDN  Node   PURGE  
  • 84. WordPress:  Ajer   CDN  Node   PURGE  
  • 85. WordPress:  Ajer   CDN  Node   (Has  to  be  instantaneous!)   PURGE  
  • 86. WordPress:  Ajer   CDN  Node   HTTP/1.1 200 OK Content-Type: text/html Content-Length: 55,666 Cache-Control: Totally Long Time!
  • 89. Before   CDN  Node   Origin   http://www.3rdparty.com/customer1.js (Referer: www.customer1.com)
  • 90. Before   CDN  Node   Origin   http://www.3rdparty.com/customer1.js
  • 91. Before   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 92. Before   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 93. Before   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 94. Before   CDN  Node   Origin   http://www.3rdparty.com/customer1.js (Ajer  1  min)  
  • 95. 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)  
  • 96. Before   CDN  Node   Origin   http://www.3rdparty.com/customer1.js 304 Not Modified (Ajer  1  min)  
  • 97. Before   CDN  Node   Origin   http://www.3rdparty.com/customer1.js 304 Not Modified (Ajer  1  min)  
  • 98. Ajer   CDN  Node   Origin   http://www.3rdparty.com/customer1.js
  • 99. Ajer   CDN  Node   Origin   http://www.3rdparty.com/customer1.js
  • 100. Ajer   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60, s-maxage=2592000 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 101. Ajer   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60, s-maxage=2592000 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 102. Ajer   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60, s-maxage=2592000 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 103. Ajer   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60, s-maxage=2592000 Last-Modified: Tue, 12 May 2015 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js
  • 104. Ajer   CDN  Node   Origin   http://www.3rdparty.com/customer1.js (Ajer  1  min)  
  • 105. Ajer   CDN  Node   Origin   http://www.3rdparty.com/customer1.js (Ajer  1  min)  
  • 106. This  happens  many  many  3mes!   (many  many  happy  visitors!)  
  • 107. Ajer   CDN  Node   Origin   Customer1   changes  config   (Ajer  1  min)  
  • 108. Ajer   CDN  Node   Origin   PURGE  customer1.js   Customer1   changes  config   (Ajer  1  min)  
  • 109. Ajer   CDN  Node   Origin   PURGE  customer1.js   Customer1   changes  config   (Ajer  1  min)  
  • 110. Ajer   CDN  Node   Origin   http://www.3rdparty.com/customer1.js (Ajer  1  min)  
  • 111. Ajer   CDN  Node   Origin   http://www.3rdparty.com/customer1.js HTTP/1.1 200 OK Cache-Control: max-age=60, s-maxage=2592000 Last-Modified: Wed, 24 Sep 2014 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 (Ajer  1  min)  
  • 112. Ajer   CDN  Node   Origin   HTTP/1.1 200 OK Cache-Control: max-age=60, s-maxage=2592000 Last-Modified: Wed, 24 Sep 2014 19:51:30 GMT Content-Type: application/javascript Date: Thu, 25 Sep 2014 12:22:20 GMT Server: Apache Content-Length: 7835 http://www.3rdparty.com/customer1.js (Ajer  1  min)  
  • 114. Programmability   •  Granular  Invalida/on  API   •  Configura/on  API   •  Logic  at  the  Edge   •  All  must  be  instantaneous  and  real  /me  
  • 115.
  • 116. 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  
  • 117. 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…  
  • 119. JSON  Data  Center  ID   CDN  Node   Origin   http://www.site.com/which_datacenter.js
  • 120. JSON  Data  Center  ID   CDN  Node   Origin   { ‘datacenter’ : ‘LAX’ } http://www.site.com/which_datacenter.js
  • 122. 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
  • 123. 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
  • 124. 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
  • 126. 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  
  • 127. Logging   •  Real  /me!   •  Log  streaming   – To  any  logging  des/na/on  endpoint   – Ex:  S3,  FTP,  syslog,  etc  
  • 128. Example:   Beacon  Termina3on  at  the  Edge  
  • 129. Before   CDN  Node   Origin   Log  Analysis   http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 130. Before   CDN  Node   Origin   Log  Analysis   http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 131. Before   CDN  Node   Origin   Log  Analysis   HTTP/1.1 200 OK Pragma: no-cache Expires: Wed, 19 Apr 2000 11:43:00 GMT Cache-Control: no-cache, no-store Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT Content-Type: image/gif Date: Fri, 20 Jun 2014 12:22:20 GMT Server: Apache Content-Length: 35 http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 132. Before   CDN  Node   Origin   Log  Analysis   HTTP/1.1 200 OK Pragma: no-cache Expires: Wed, 19 Apr 2000 11:43:00 GMT Cache-Control: no-cache, no-store Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT Content-Type: image/gif Date: Fri, 20 Jun 2014 12:22:20 GMT Server: Apache Content-Length: 35 http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 133. Ajer   CDN  Node   Origin   http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 134. Ajer   CDN  Node   Origin   HTTP/1.1 200 OK Pragma: no-cache Expires: Wed, 19 Apr 2000 11:43:00 GMT Cache-Control: no-cache, no-store Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT Content-Type: image/gif Date: Fri, 20 Jun 2014 12:22:20 GMT Server: Apache Content-Length: 35 http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 135. Ajer   CDN  Node   Origin   HTTP/1.1 204 No Content Date: Sat, 21 Jun 2014 23:21:12 GMT Server: Awesome Server Content-Length: 0 http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 136. Ajer   CDN  Node   Origin   Syslog  /  S3  /  FTP/etc   http://collector.site.com/beacon.img?a=1&b=2&c=3
  • 137. 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