SlideShare una empresa de Scribd logo
1 de 97
Varnish	
  in	
  ac*on
Thijs	
  Feryn
Support	
  manager
+32	
  (0)9	
  218	
  79	
  06
thijs@combellgroup.com
PHP	
  Barcelona	
  Conference
Friday	
  October	
  29th	
  2010
Barcelona	
  Spain
About	
  me
I’m	
  the	
  support	
  manager	
  at	
  Combell
About	
  me
I’m	
  a	
  board	
  member	
  at	
  PHPBenelux
I	
  live	
  in	
  the	
  wonderful	
  city	
  of	
  Bruges
MPBecker	
  -­‐	
  Bruges	
  by	
  Night	
  hUp://www.flickr.com/photos/galverson2/3715965933
Follow	
  me	
  on	
  TwiUer:	
  @ThijsFeryn
Read	
  my	
  blog:	
  hUp://blog.feryn.eu
Varnish
Varnish
Reverse	
  proxy?
Caching	
  proxy?
Loadbalancer?
Varnish
HTTP	
  accelerator	
  !
Caching
Caching
Storing	
  computed	
  data	
  for	
  faster	
  
serving	
  of	
  future	
  requests
Basically
Puang	
  stuff	
  in	
  boxes	
  for	
  later	
  use
Why?
Protect	
  your	
  server
In	
  the	
  beginning	
  there	
  was	
  ...
Browser	
  cache
Browser	
  cache:	
  expira*on
Expires:	
  Sun,	
  25	
  Jun	
  2006	
  14:57:12	
  
Cache-­‐Control:	
  max-­‐age=86400,	
  
must-­‐revalidate
Browser	
  cache:	
  valida*on
Last-­‐Modified:	
  Sun,	
  25	
  Jun	
  2006	
  14:57:12	
  GMT
ETag:	
  “686897696a7c876b7e”
Browser	
  cache:	
  valida*on
Last-­‐Modified:	
  Sun,	
  25	
  Jun	
  2006	
  14:57:12	
  GMT
ETag:	
  “686897696a7c876b7e”
Compared	
  with	
  the	
  “If-­‐None-­‐Match”	
  header.	
  
Throws	
  “HTTP/1.0	
  304	
  Not	
  Modified”	
  accordingly
Browser	
  cache:	
  in	
  PHP
Browser	
  cache:	
  in	
  PHP
<?php
$seconds = 10;
$expires = gmdate('D, j M Y H:i:s T', time() + $seconds);
header("Expires: $expires");
header("Cache-Control: max-age=$seconds, must-revalidate");
?>
<ul>
    <li>Current date/time: <?= gmdate('D, j M Y H:i:s T')?></li>
    <li>Expires: <?= $expires ?></li>
    <li>Cache-control: <?= $seconds?> seconds</li>
</ul>
Browser	
  cache:	
  in	
  Apache
Browser	
  cache:	
  in	
  Apache
ExpiresAc*ve	
  on
ExpiresDefault	
  "access	
  plus	
  1	
  month"
ExpiresDefault	
  "now	
  plus	
  4	
  weeks"
ExpiresDefault	
  "modifica*on	
  plus	
  30	
  days"
ExpiresByType	
  text/html	
  "access	
  plus	
  1	
  month	
  15	
  days	
  2	
  hours"
ExpiresByType	
  image/gif	
  "modifica*on	
  plus	
  5	
  hours	
  3	
  minutes"
Browser	
  cache	
  is	
  your	
  friend	
  !
Problems	
  with	
  browser	
  cache
Problems	
  with	
  browser	
  cache
Mul*ple	
  standards
Can	
  be	
  ignored	
  by	
  browser
Force	
  refresh
Cache	
  per	
  client
Solu*ons:	
  use	
  a	
  caching/reverse	
  proxy!
Use	
  a	
  caching/reverse	
  proxy
Varnish	
  does	
  that
It’ll	
  make	
  your	
  site	
  fly!
Info
•Website:	
  hUp://www.varnish-­‐cache.org
•Wiki:	
  hUp://www.varnish-­‐cache.org/trac/wiki
•Examples:	
  hUp://www.varnish-­‐cache.org/trac/wiki/VCLExamples
•DocumentaHon	
  site:	
  hUp://www.varnish-­‐cache.org/docs/2.1	
  
Setup	
  Varnish
Setup	
  Varnish
DAEMON_OPTS="-a :80 
-T localhost:6082 
-f /etc/varnish/default.vcl 
-s file,/var/lib/varnish/$INSTANCE/
varnish_storage.bin,1G"
In	
  “/etc/default/varnish”
Setup	
  the	
  backend
Setup	
  the	
  backend
backend default {
.host = "127.0.0.1";
.port = "8080";
}
In	
  “/etc/varnish/default.vcl”
Setup	
  the	
  backend
Listen 8080
In	
  “/etc/apache2/ports.conf”
Out	
  of	
  the	
  box	
  Varnish	
  will	
  only	
  ...
...	
  obey	
  your	
  caching	
  headers
...	
  and	
  cache	
  sta*c	
  files
Time	
  for	
  ac*on	
  !
Request vcl_recv
In cache?
vcl_hash Cacheable?
vcl_hit() vcl_miss()
vcl_deliver()
vcl_fetch()
No
Yes
NoYes
Response
Hits	
  &	
  misses
Logging	
  &	
  sta*s*cs	
  
Varnishstat
Real	
  *me	
  stats	
  of	
  running	
  varnishd	
  instance
hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishstat.html
Hitrate	
  ratio:	
  	
  	
  	
  	
  	
  	
  10	
  	
  	
  	
  	
  	
  100	
  	
  	
  	
  	
  	
  121
Hitrate	
  avg:	
  	
  	
  	
  	
  0.5365	
  	
  	
  0.5287	
  	
  	
  0.5277
	
  	
  	
  	
  	
  	
  	
  	
  9957	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  4.10	
  Client	
  connections	
  accepted
	
  	
  	
  	
  	
  	
  	
  58932	
  	
  	
  	
  	
  	
  	
  	
  67.92	
  	
  	
  	
  	
  	
  	
  	
  24.28	
  Client	
  requests	
  received
	
  	
  	
  	
  	
  	
  	
  30483	
  	
  	
  	
  	
  	
  	
  	
  	
  1.00	
  	
  	
  	
  	
  	
  	
  	
  12.56	
  Cache	
  hits
	
  	
  	
  	
  	
  	
  	
  	
  8592	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  3.54	
  Cache	
  hits	
  for	
  pass
	
  	
  	
  	
  	
  	
  	
  18991	
  	
  	
  	
  	
  	
  	
  	
  66.92	
  	
  	
  	
  	
  	
  	
  	
  	
  7.82	
  Cache	
  misses
	
  	
  	
  	
  	
  	
  	
  28449	
  	
  	
  	
  	
  	
  	
  	
  66.92	
  	
  	
  	
  	
  	
  	
  	
  11.72	
  Backend	
  connections	
  success
	
  	
  	
  	
  	
  	
  	
  22562	
  	
  	
  	
  	
  	
  	
  	
  66.92	
  	
  	
  	
  	
  	
  	
  	
  	
  9.30	
  Backend	
  connections	
  reuses
	
  	
  	
  	
  	
  	
  	
  28357	
  	
  	
  	
  	
  	
  	
  	
  66.92	
  	
  	
  	
  	
  	
  	
  	
  11.68	
  Backend	
  connections	
  recycles
	
  	
  	
  	
  	
  	
  	
  	
  	
  488	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  srcaddr
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  7	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  active	
  struct	
  srcaddr
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  81	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  sess_mem
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  21	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  sess
	
  	
  	
  	
  	
  	
  	
  	
  4398	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  object
	
  	
  	
  	
  	
  	
  	
  	
  4401	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  objecthead
	
  	
  	
  	
  	
  	
  	
  	
  9220	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  smf
	
  	
  	
  	
  	
  	
  	
  	
  	
  355	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  small	
  free	
  smf
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  6	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  large	
  free	
  smf
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  2	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  vbe_conn
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  10	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  struct	
  bereq
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  17	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  worker	
  threads
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  28	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  0.01	
  N	
  worker	
  threads	
  created
	
  	
  	
  	
  	
  	
  	
  	
  	
  164	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  0.07	
  N	
  overflowed	
  work	
  requests
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  1	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  backends
	
  	
  	
  	
  	
  	
  	
  14608	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  expired	
  objects
	
  	
  	
  	
  	
  	
  	
  24113	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  .	
  	
  	
  N	
  LRU	
  moved	
  objects
	
  	
  	
  	
  	
  	
  	
  53778	
  	
  	
  	
  	
  	
  	
  	
  66.92	
  	
  	
  	
  	
  	
  	
  	
  22.16	
  Objects	
  sent	
  with	
  write
	
  	
  	
  	
  	
  	
  	
  	
  9957	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  4.10	
  Total	
  Sessions
	
  	
  	
  	
  	
  	
  	
  58935	
  	
  	
  	
  	
  	
  	
  	
  67.92	
  	
  	
  	
  	
  	
  	
  	
  24.28	
  Total	
  Requests
	
  	
  	
  	
  	
  	
  	
  	
  9458	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  3.90	
  Total	
  pass
	
  	
  	
  	
  	
  	
  	
  28445	
  	
  	
  	
  	
  	
  	
  	
  66.92	
  	
  	
  	
  	
  	
  	
  	
  11.72	
  Total	
  fetch
	
  	
  	
  	
  22496844	
  	
  	
  	
  	
  23506.62	
  	
  	
  	
  	
  	
  9269.40	
  Total	
  header	
  bytes
	
  	
  	
  606897837	
  	
  	
  	
  263427.01	
  	
  	
  	
  250060.91	
  Total	
  body	
  bytes
	
  	
  	
  	
  	
  	
  	
  	
  1384	
  	
  	
  	
  	
  	
  	
  	
  	
  0.00	
  	
  	
  	
  	
  	
  	
  	
  	
  0.57	
  Session	
  Closed
Varnishlog
Display	
  requests	
  of	
  running	
  varnishd	
  instance
hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishlog.html
Notable	
  tags
Varnishlog
• RxHeader
• RxLostHeader
• RxProtocol
• RxRequest
• RxResponse
• RxStatus
• RxURL
• TxHeader
• TxLostHeader
• TxProtocol
• TxRequest
• TxResponse
• TxStatus
• TxURL
• ReqEnd
• ReqStart
• Hit
• Error
• VCL_call
• VCL_return
• VCL_acl
Varnishlog
varnishlog	
  -­‐c	
  -­‐o	
  RxRequest	
  POST
All	
  POST	
  requests
Varnishlog
varnishlog	
  -­‐c	
  -­‐i	
  RxHeader	
  -­‐I	
  ^User-­‐Agent
All	
  user	
  agents
Varnishlog
varnishlog	
  -­‐i	
  TxURL
All	
  URL’s	
  that	
  “missed”
Varnishlog
varnishlog	
  	
  -­‐o	
  VCL_call	
  hit	
  |	
  grep	
  RxURL
All	
  URL’s	
  that	
  “hit”
Varnishlog
varnishlog	
  	
  -­‐w	
  /tmp/yourfile.log
Write	
  log	
  to	
  file
varnishlog	
  	
  -­‐r	
  /tmp/yourfile.log
Read	
  log	
  from	
  file
 	
  	
  12	
  SessionOpen	
  	
  c	
  172.16.26.1	
  50396	
  :8080
	
  	
  	
  12	
  ReqStart	
  	
  	
  	
  	
  c	
  172.16.26.1	
  50396	
  668213522
	
  	
  	
  12	
  RxRequest	
  	
  	
  	
  c	
  GET
	
  	
  	
  12	
  RxURL	
  	
  	
  	
  	
  	
  	
  	
  c	
  /test.php
	
  	
  	
  12	
  RxProtocol	
  	
  	
  c	
  HTTP/1.1
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Host:	
  varnish.dev:8080
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  User-­‐Agent:	
  Mozilla/5.0	
  (Macintosh;	
  U;	
  Intel	
  Mac	
  OS	
  X	
  10.6;	
  nl;	
  
rv:1.9.2.10)	
  Gecko/20100914	
  Firefox/3.6.10
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Accept:	
  text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Accept-­‐Language:	
  nl,en-­‐us;q=0.7,en;q=0.3
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Accept-­‐Encoding:	
  gzip,deflate
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Accept-­‐Charset:	
  ISO-­‐8859-­‐1,utf-­‐8;q=0.7,*;q=0.7
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Keep-­‐Alive:	
  115
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Connection:	
  keep-­‐alive
	
  	
  	
  12	
  RxHeader	
  	
  	
  	
  	
  c	
  Cookie:	
  PHPSESSID=2n2pkit81qdgk6k4trf1crft16
	
  	
  	
  12	
  VCL_call	
  	
  	
  	
  	
  c	
  recv
	
  	
  	
  12	
  VCL_return	
  	
  	
  c	
  pass
	
  	
  	
  12	
  VCL_call	
  	
  	
  	
  	
  c	
  hash
	
  	
  	
  12	
  VCL_return	
  	
  	
  c	
  hash
	
  	
  	
  12	
  VCL_call	
  	
  	
  	
  	
  c	
  pass
	
  	
  	
  12	
  VCL_return	
  	
  	
  c	
  pass
	
  	
  	
  14	
  BackendClose	
  -­‐	
  default
	
  	
  	
  14	
  BackendOpen	
  	
  b	
  default	
  127.0.0.1	
  34267	
  127.0.0.1	
  80
	
  	
  	
  12	
  Backend	
  	
  	
  	
  	
  	
  c	
  14	
  default	
  default
 	
  	
  14	
  TxRequest	
  	
  	
  	
  b	
  GET
	
  	
  	
  14	
  TxURL	
  	
  	
  	
  	
  	
  	
  	
  b	
  /test.php
	
  	
  	
  14	
  TxProtocol	
  	
  	
  b	
  HTTP/1.1
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  Host:	
  varnish.dev:8080
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  User-­‐Agent:	
  Mozilla/5.0	
  (Macintosh;	
  U;	
  Intel	
  Mac	
  OS	
  X	
  10.6;	
  nl;	
  
rv:1.9.2.10)	
  Gecko/20100914	
  Firefox/3.6.10
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  Accept:	
  text/html,application/xhtml+xml,application/xml;q=0.9,*/
*;q=0.8
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  Accept-­‐Language:	
  nl,en-­‐us;q=0.7,en;q=0.3
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  Accept-­‐Encoding:	
  gzip,deflate
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  Accept-­‐Charset:	
  ISO-­‐8859-­‐1,utf-­‐8;q=0.7,*;q=0.7
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  Cookie:	
  PHPSESSID=2n2pkit81qdgk6k4trf1crft16
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  X-­‐Forwarded-­‐For:	
  172.16.26.1
	
  	
  	
  14	
  TxHeader	
  	
  	
  	
  	
  b	
  X-­‐Varnish:	
  668213522
	
  	
  	
  14	
  RxProtocol	
  	
  	
  b	
  HTTP/1.1
	
  	
  	
  14	
  RxStatus	
  	
  	
  	
  	
  b	
  200
	
  	
  	
  14	
  RxResponse	
  	
  	
  b	
  OK
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  Date:	
  Tue,	
  19	
  Oct	
  2010	
  12:54:49	
  GMT
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  Server:	
  Apache/2.2.16	
  (Ubuntu)
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  X-­‐Powered-­‐By:	
  PHP/5.3.3-­‐1ubuntu9
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  Vary:	
  Accept-­‐Encoding
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  Content-­‐Encoding:	
  gzip
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  Content-­‐Length:	
  36
	
  	
  	
  14	
  RxHeader	
  	
  	
  	
  	
  b	
  Content-­‐Type:	
  text/html
 	
  	
  12	
  TTL	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  c	
  668213522	
  RFC	
  120	
  1287492889	
  0	
  0	
  0	
  0
	
  	
  	
  12	
  VCL_call	
  	
  	
  	
  	
  c	
  fetch
	
  	
  	
  12	
  TTL	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  c	
  668213522	
  VCL	
  10	
  1287492889
	
  	
  	
  12	
  VCL_return	
  	
  	
  c	
  pass
	
  	
  	
  12	
  ObjProtocol	
  	
  c	
  HTTP/1.1
	
  	
  	
  12	
  ObjStatus	
  	
  	
  	
  c	
  200
	
  	
  	
  12	
  ObjResponse	
  	
  c	
  OK
	
  	
  	
  12	
  ObjHeader	
  	
  	
  	
  c	
  Date:	
  Tue,	
  19	
  Oct	
  2010	
  12:54:49	
  GMT
	
  	
  	
  12	
  ObjHeader	
  	
  	
  	
  c	
  Server:	
  Apache/2.2.16	
  (Ubuntu)
	
  	
  	
  12	
  ObjHeader	
  	
  	
  	
  c	
  X-­‐Powered-­‐By:	
  PHP/5.3.3-­‐1ubuntu9
	
  	
  	
  12	
  ObjHeader	
  	
  	
  	
  c	
  Vary:	
  Accept-­‐Encoding
	
  	
  	
  12	
  ObjHeader	
  	
  	
  	
  c	
  Content-­‐Encoding:	
  gzip
	
  	
  	
  12	
  ObjHeader	
  	
  	
  	
  c	
  Content-­‐Type:	
  text/html
	
  	
  	
  14	
  Length	
  	
  	
  	
  	
  	
  	
  b	
  36
	
  	
  	
  14	
  BackendReuse	
  b	
  default
	
  	
  	
  12	
  VCL_call	
  	
  	
  	
  	
  c	
  deliver
	
  	
  	
  12	
  VCL_return	
  	
  	
  c	
  deliver
	
  	
  	
  12	
  TxProtocol	
  	
  	
  c	
  HTTP/1.1
	
  	
  	
  12	
  TxStatus	
  	
  	
  	
  	
  c	
  200
	
  	
  	
  12	
  TxResponse	
  	
  	
  c	
  OK
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Server:	
  Apache/2.2.16	
  (Ubuntu)
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  X-­‐Powered-­‐By:	
  PHP/5.3.3-­‐1ubuntu9
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Vary:	
  Accept-­‐Encoding
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Content-­‐Encoding:	
  gzip
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Content-­‐Type:	
  text/html
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Content-­‐Length:	
  36
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Date:	
  Tue,	
  19	
  Oct	
  2010	
  12:54:49	
  GMT
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  X-­‐Varnish:	
  668213522
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Age:	
  0
	
  	
  	
  12	
  TxHeader	
  	
  	
  	
  	
  c	
  Via:	
  1.1	
  varnish
Varnishtop
Read	
  memory	
  logs	
  and	
  presents	
  them	
  as	
  a	
  
con*nuously	
  updated	
  list	
  of	
  commonly	
  
occuring	
  log	
  entries
hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishtop.html
Varnishtop
varnishtop	
  -­‐i	
  RxHeader	
  -­‐I	
  ^User-­‐Agent
Get	
  the	
  top	
  user	
  agents
Varnishtop
varnishtop	
  -­‐i	
  RxRequest
Get	
  the	
  top	
  request	
  methods
Varnishtop
varnishtop	
  -­‐i	
  TxURL
Get	
  the	
  top	
  misses
list	
  length	
  90	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
dev
	
  	
  	
  	
  76.42	
  VCL_return	
  	
  	
  	
  	
  pass	
  	
  	
  
	
  	
  	
  	
  50.95	
  RxProtocol	
  	
  	
  	
  	
  HTTP/1.1
	
  	
  	
  	
  50.95	
  TxProtocol	
  	
  	
  	
  	
  HTTP/1.1
	
  	
  	
  	
  27.54	
  Length	
  	
  	
  	
  	
  	
  	
  	
  	
  110
	
  	
  	
  	
  25.48	
  Debug	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  herding
	
  	
  	
  	
  25.47	
  RxRequest	
  	
  	
  	
  	
  	
  GET
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Host:	
  varnish.dev:8080
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  User-­‐Agent:	
  Mozilla/5.0	
  (Macintosh;	
  U;	
  Intel	
  Mac	
  OS	
  X	
  10.6;	
  nl;
rv:1.9.2.10)	
  Gecko/20100914	
  Firefox/3.6.10
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Accept:	
  text/html,application/xhtml+xml,application/
xml;q=0.9,*/*;q=0.8
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Accept-­‐Language:	
  nl,en-­‐us;q=0.7,en;q=0.3
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Accept-­‐Encoding:	
  gzip,deflate
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Accept-­‐Charset:	
  ISO-­‐8859-­‐1,utf-­‐8;q=0.7,*;q=0.7
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Keep-­‐Alive:	
  115
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Connection:	
  keep-­‐alive
	
  	
  	
  	
  25.47	
  RxHeader	
  	
  	
  	
  	
  	
  	
  Cookie:	
  PHPSESSID=2n2pkit81qdgk6k4trf1crft16
	
  	
  	
  	
  25.47	
  VCL_call	
  	
  	
  	
  	
  	
  	
  recv
	
  	
  	
  	
  25.47	
  VCL_call	
  	
  	
  	
  	
  	
  	
  hash
	
  	
  	
  	
  25.47	
  VCL_return	
  	
  	
  	
  	
  hash
	
  	
  	
  	
  25.47	
  VCL_call	
  	
  	
  	
  	
  	
  	
  pass
	
  	
  	
  	
  25.47	
  Backend	
  	
  	
  	
  	
  	
  	
  	
  14	
  default	
  default
	
  	
  	
  	
  25.47	
  TxRequest	
  	
  	
  	
  	
  	
  GET
	
  	
  	
  	
  25.47	
  TxHeader	
  	
  	
  	
  	
  	
  	
  Host:	
  varnish.dev:8080
	
  	
  	
  	
  25.47	
  TxHeader	
  	
  	
  	
  	
  	
  	
  User-­‐Agent:	
  Mozilla/5.0	
  (Macintosh;	
  U;	
  Intel	
  Mac	
  OS	
  X	
  10.6;	
  nl;
rv:1.9.2.10)	
  Gecko/20100914	
  Firefox/3.6.10
	
  	
  	
  	
  25.47	
  TxHeader	
  	
  	
  	
  	
  	
  	
  Accept:	
  text/html,application/xhtml+xml,application/
Varnishncsa
Read	
  memory	
  logs	
  and	
  presents	
  them	
  in	
  the	
  
Apache	
  /	
  NCSA	
  “combined”	
  log	
  format
hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishncsa.html
Varnishncsa
varnishncsa	
  -­‐D	
  -­‐a	
  -­‐w	
  /var/log/some.log
172.16.26.1	
  -­‐	
  -­‐	
  [19/Oct/2010:16:08:02	
  +0200]	
  "GET	
  hUp://
varnish.dev:8080/	
  HTTP/1.1"	
  200	
  97	
  "-­‐"	
  "Mozilla/5.0	
  (Macintosh;	
  U;	
  
Intel	
  Mac	
  OS	
  X	
  10.6;	
  nl;	
  rv:1.9.2.10)	
  Gecko/20100914	
  Firefox/3.6.10"
172.16.26.1	
  -­‐	
  -­‐	
  [19/Oct/2010:16:08:10	
  +0200]	
  "GET	
  hUp://
varnish.dev:8080/test.php	
  HTTP/1.1"	
  200	
  36	
  "-­‐"	
  "Mozilla/5.0	
  
(Macintosh;	
  U;	
  Intel	
  Mac	
  OS	
  X	
  10.6;	
  nl;	
  rv:1.9.2.10)	
  Gecko/20100914	
  
Firefox/3.6.10"
Varnishreplay
The	
  varnishreplay	
  u*lity	
  parses	
  varnish	
  logs	
  and	
  
aUempts	
  to	
  reproduce	
  the	
  traffic
hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishreplay.html
Varnishreplay
varnishlog	
  	
  -­‐w	
  /tmp/yourfile.log
varnishreplay	
  	
  -­‐r	
  /tmp/yourfile.log
Management	
  via	
  telnet
Management	
  via	
  telnet
root@dev:/#	
  telnet	
  localhost	
  6082
Trying	
  ::1...
Connected	
  to	
  localhost.
Escape	
  character	
  is	
  '^]'.
200	
  154	
  	
  	
  	
  	
  
-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐
Varnish	
  HTTP	
  accelerator	
  CLI.
-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐
Type	
  'help'	
  for	
  command	
  list.
Type	
  'quit'	
  to	
  close	
  CLI	
  session.
Notable	
  ac*ons
Management	
  via	
  telnet
• vcl.load	
  <configname>	
  <filename>
• vcl.use	
  <configname>
• vcl.discard	
  <configname>
• vcl.list
• vcl.show	
  <configname>
Avoid	
  interrup*on
More	
  ac*on?
Request vcl_recv
In cache?
vcl_hash Cacheable?
vcl_hit() vcl_miss()
vcl_deliver()
vcl_fetch()
No
Yes
NoYes
Response
sub vcl_recv {
if ( (req.request == "GET" || req.request == "HEAD")
&& req.url ~ ".(png|gif|jpe?g|swf|css|js|html?|sstm)
$" ) {
return(lookup);
} else {
return(pass);
}
}
Cache	
  sta*c	
  files
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
}
Provide	
  HIT/MISS	
  informa*on
sub vcl_fetch {
set beresp.ttl = 10s;
}
Manipulate	
  TTL
sub vcl_recv {
if (req.request == "GET" || req.request ==
"HEAD") {
return (lookup);
}
}
sub vcl_hash {
if (req.http.Cookie) {
set req.hash += req.http.Cookie;
}
}
Cache	
  ...	
  even	
  with	
  cookies
sub vcl_recv {
unset req.http.cookie;
}
sub vcl_fetch {
unset beresp.http.set-cookie;
}
Remove	
  cookies
sub vcl_recv {
if (req.http.Cookie) {
set req.http.Cookie = regsuball
(req.http.Cookie,"(^|; ) *__utm.=[^;]+;?
*","1");
if (req.http.Cookie == "") {
remove req.http.Cookie;
}
}
Remove	
  Google	
  Analy*cs	
  cookies
backend default {
.host = "default.server.com";
.port = "80";
}
backend other {
.host = "other.server.com";
.port = "80";
}
sub vcl_recv {
if(req.http.host ~ "^www."){
set req.backend= default;
} else {
set req.backend = other;
}
}
Mul*ple	
  backends:	
  hostname	
  filtering
Default backend Other backend
www.example.com example.com
sub vcl_recv {
if (req.backend.healthy) {
set req.grace = 1s;
} else {
set req.grace = 10s;
}
}
Grace	
  mode
Keep	
  reading	
  from	
  cache,	
  
even	
  when	
  expired
backend default {
.host = "default.server.com";
.port = "80";
.probe = {
.url = "/";
.timeout = 50 ms;
.interval = 1s;
.window = 2;
.threshold = 2;
}
}
Mul*ple	
  backends:	
  health	
  checks
backend other {
.host = "other.server.com";
.port = "80";
.probe = {
.url = "/";
.timeout = 50 ms;
.interval = 1s;
.window = 2;
.threshold = 2;
}
}
Mul*ple	
  backends:	
  health	
  checks
sub vcl_recv {
if (req.restarts == 0) {
set req.backend = default;
} else {
set req.backend = other;
}
return(pass);
}
sub vcl_error {
if (obj.status == 503 && req.restarts
< 4) {
restart;
}
}
Mul*ple	
  backends:	
  health	
  checks
Default backend Other backend
Default backend Other backend
director back round-robin {
{.backend = default;}
{.backend = other;}
}
sub vcl_recv {
set req.backend = back;
return(pass);
}
Loadbalancing	
  via	
  directors
Default backend Other backend
50% 50%
director back random {
{.backend = default; .weight=1;}
{.backend = other; .weight=2;}
}
sub vcl_recv {
set req.backend = back;
return(pass);
}
Loadbalancing	
  via	
  directors
Default backend Other backend
33% 66%
acl purge_acl {
"localhost";
"1.2.3.4";
"some.host.ext";
}
sub vcl_recv {
if (req.request == "PURGE") {
if (!client.ip ~ purge_acl) {
error 405 "Not allowed.";
}
purge_url(req.url);
error 200 "Purged.";
}
return(lookup);
}
Purging
curl	
  -­‐X	
  PURGE	
  hUp://yoursite.com/yourpage
Edge	
  Side	
  Includes:	
  the	
  final	
  piece	
  of	
  the	
  puzzle
header.php
menu.php main.php
footer.php
<html>
<body>
    <table>
      <tr colspan="2">
        <td><?php include('header.php') ?></td>
      </tr>
      <tr>
        <td><?php include('menu.php') ?></td>
        <td><?php include('main.php') ?></td>
      </tr>      
      <tr colspan="2">
        <td><?php include('footer.php') ?></td>
      </tr>      
    </table>
  </body>
</html>
header.php
menu.php main.php
footer.php
TTL	
  5s
No	
  caching
TTL	
  10s
TTL	
  2s
<?php
function esi($file){
    if(array_key_exists('HTTP_X_VARNISH',$_SERVER)){
        header("esi-enabled: 1");
        $url = 'http://'.$_SERVER['HTTP_HOST'].substr
($_SERVER['SCRIPT_NAME'],0,1+strrpos($_SERVER
['SCRIPT_NAME'],'/')).$file;
        echo "<esi:include src="$url" />".PHP_EOL;
    } else {
        include($file);
    }
}
<html>
<body>
<table>
<tr colspan="2">
<td><esi:include src="/header.php" /></td>
</tr>
<tr>
<td><esi:include src="/menu.php" /></td>
<td><esi:include src="/main.php" /></td>
</tr>
<tr colspan="2">
<td><esi:include src="/footer.php" /></td>
</tr>
</table>
</body>
</html>
sub vcl_recv {
if(req.url == "/header.php") {
return (pass);
}
if(req.url ~ "^/(footer|main|menu).php$") {
return (lookup);
}
}
sub vcl_fetch {
if (beresp.http.esi-enabled == "1") {
esi;
unset beresp.http.esi-enabled;
}
if(req.url == "/footer.php") {
set beresp.ttl = 5s;
}
if(req.url == "/menu.php") {
set beresp.ttl = 10s;
}
if(req.url == "/main.php") {
set beresp.ttl = 2s;
}
}
Enough	
  ac*on,	
  *me	
  to	
  relax	
  ...
Q&A

Más contenido relacionado

La actualidad más candente

Hacking (with) WebSockets
Hacking (with) WebSocketsHacking (with) WebSockets
Hacking (with) WebSocketsSergey Shekyan
 
Reshaping Core Genomics Software Tools for the Manycore Era
Reshaping Core Genomics Software Tools for the Manycore EraReshaping Core Genomics Software Tools for the Manycore Era
Reshaping Core Genomics Software Tools for the Manycore EraIntel® Software
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesAlex Akselrod
 
GemStone/S Update
GemStone/S UpdateGemStone/S Update
GemStone/S UpdateESUG
 
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014odnoklassniki.ru
 
Nvidia® cuda™ 5 sample evaluationresult_2
Nvidia® cuda™ 5 sample evaluationresult_2Nvidia® cuda™ 5 sample evaluationresult_2
Nvidia® cuda™ 5 sample evaluationresult_2Yukio Saito
 
Don't dump thread dumps
Don't dump thread dumpsDon't dump thread dumps
Don't dump thread dumpsTier1app
 
RSA NetWitness Log Decoder
RSA NetWitness Log DecoderRSA NetWitness Log Decoder
RSA NetWitness Log DecoderSusam Pal
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...JAX London
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia DatabasesJaime Crespo
 
Mining pools and attacks
Mining pools and attacksMining pools and attacks
Mining pools and attacksvpnmentor
 
Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection HeroTier1app
 
Become a GC Hero
Become a GC HeroBecome a GC Hero
Become a GC HeroTier1app
 
ioDrive de benchmarking 2011 1209_zem_distribution
ioDrive de benchmarking 2011 1209_zem_distributionioDrive de benchmarking 2011 1209_zem_distribution
ioDrive de benchmarking 2011 1209_zem_distributionMasahito Zembutsu
 
GC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash CourseGC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash CourseTier1 app
 
The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 101 of 196
The Ring programming language version 1.7 book - Part 101 of 196The Ring programming language version 1.7 book - Part 101 of 196
The Ring programming language version 1.7 book - Part 101 of 196Mahmoud Samir Fayed
 
Large scale-olap-with-kobayashi
Large scale-olap-with-kobayashiLarge scale-olap-with-kobayashi
Large scale-olap-with-kobayashiBoundary
 
Gc crash course (1)
Gc crash course (1)Gc crash course (1)
Gc crash course (1)Tier1 app
 

La actualidad más candente (20)

Hacking (with) WebSockets
Hacking (with) WebSocketsHacking (with) WebSockets
Hacking (with) WebSockets
 
Redo internals ppt
Redo internals pptRedo internals ppt
Redo internals ppt
 
Reshaping Core Genomics Software Tools for the Manycore Era
Reshaping Core Genomics Software Tools for the Manycore EraReshaping Core Genomics Software Tools for the Manycore Era
Reshaping Core Genomics Software Tools for the Manycore Era
 
Fredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slidesFredericksburg LUG Bitcoin slides
Fredericksburg LUG Bitcoin slides
 
GemStone/S Update
GemStone/S UpdateGemStone/S Update
GemStone/S Update
 
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
 
Nvidia® cuda™ 5 sample evaluationresult_2
Nvidia® cuda™ 5 sample evaluationresult_2Nvidia® cuda™ 5 sample evaluationresult_2
Nvidia® cuda™ 5 sample evaluationresult_2
 
Don't dump thread dumps
Don't dump thread dumpsDon't dump thread dumps
Don't dump thread dumps
 
RSA NetWitness Log Decoder
RSA NetWitness Log DecoderRSA NetWitness Log Decoder
RSA NetWitness Log Decoder
 
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
Java Core | Understanding the Disruptor: a Beginner's Guide to Hardcore Concu...
 
Backing up Wikipedia Databases
Backing up Wikipedia DatabasesBacking up Wikipedia Databases
Backing up Wikipedia Databases
 
Mining pools and attacks
Mining pools and attacksMining pools and attacks
Mining pools and attacks
 
Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection Hero
 
Become a GC Hero
Become a GC HeroBecome a GC Hero
Become a GC Hero
 
ioDrive de benchmarking 2011 1209_zem_distribution
ioDrive de benchmarking 2011 1209_zem_distributionioDrive de benchmarking 2011 1209_zem_distribution
ioDrive de benchmarking 2011 1209_zem_distribution
 
GC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash CourseGC Tuning & Troubleshooting Crash Course
GC Tuning & Troubleshooting Crash Course
 
The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202The Ring programming language version 1.8 book - Part 54 of 202
The Ring programming language version 1.8 book - Part 54 of 202
 
The Ring programming language version 1.7 book - Part 101 of 196
The Ring programming language version 1.7 book - Part 101 of 196The Ring programming language version 1.7 book - Part 101 of 196
The Ring programming language version 1.7 book - Part 101 of 196
 
Large scale-olap-with-kobayashi
Large scale-olap-with-kobayashiLarge scale-olap-with-kobayashi
Large scale-olap-with-kobayashi
 
Gc crash course (1)
Gc crash course (1)Gc crash course (1)
Gc crash course (1)
 

Destacado

5 Reasons Why Your Podcast Sucks On Itunes
5 Reasons Why Your Podcast Sucks On Itunes5 Reasons Why Your Podcast Sucks On Itunes
5 Reasons Why Your Podcast Sucks On ItunesEvo Terra
 
Old Vs New A New Approach To A Mobile Classroom
Old Vs New A New Approach To A Mobile ClassroomOld Vs New A New Approach To A Mobile Classroom
Old Vs New A New Approach To A Mobile Classroomguestccce4e
 
Luxury Complex
Luxury ComplexLuxury Complex
Luxury ComplexJulie Kim
 
Disrupting Complacency - It Only Works Until It Doesn't
Disrupting Complacency - It Only Works Until It Doesn'tDisrupting Complacency - It Only Works Until It Doesn't
Disrupting Complacency - It Only Works Until It Doesn'tEvo Terra
 
The Really Smelly Prince
The Really Smelly PrinceThe Really Smelly Prince
The Really Smelly PrinceMrs. McCabe
 
Php through the eyes of a hoster pbc10
Php through the eyes of a hoster pbc10Php through the eyes of a hoster pbc10
Php through the eyes of a hoster pbc10Combell NV
 
The Disconnect: Reasons Companies fail at Social Media and how to Succeed
The Disconnect: Reasons Companies fail at Social Media and how to SucceedThe Disconnect: Reasons Companies fail at Social Media and how to Succeed
The Disconnect: Reasons Companies fail at Social Media and how to SucceedEvo Terra
 
Pengembangan Kawasan Andalan Riau
Pengembangan Kawasan Andalan RiauPengembangan Kawasan Andalan Riau
Pengembangan Kawasan Andalan RiauAri Raharjo
 
Novo manuel d’activités d’éducation pour l’enfance
Novo manuel d’activités d’éducation pour l’enfanceNovo manuel d’activités d’éducation pour l’enfance
Novo manuel d’activités d’éducation pour l’enfanceArlete Laenzlinger
 
Entrepreneurship In Corporations
Entrepreneurship In CorporationsEntrepreneurship In Corporations
Entrepreneurship In CorporationsSonny Navaratnam
 
Mobiles by Julie Frith
Mobiles by Julie FrithMobiles by Julie Frith
Mobiles by Julie Frithfrithmobiles
 
Contratação escola aviso nº 7 grupo 510
Contratação escola aviso nº 7  grupo 510Contratação escola aviso nº 7  grupo 510
Contratação escola aviso nº 7 grupo 510Pedro França
 
things in nature
things in naturethings in nature
things in natureMrs. McCabe
 
Greenland Prpoerty Mgt
Greenland Prpoerty MgtGreenland Prpoerty Mgt
Greenland Prpoerty MgtJulie Kim
 

Destacado (20)

5 Reasons Why Your Podcast Sucks On Itunes
5 Reasons Why Your Podcast Sucks On Itunes5 Reasons Why Your Podcast Sucks On Itunes
5 Reasons Why Your Podcast Sucks On Itunes
 
Vfinal V1
Vfinal V1Vfinal V1
Vfinal V1
 
Old Vs New A New Approach To A Mobile Classroom
Old Vs New A New Approach To A Mobile ClassroomOld Vs New A New Approach To A Mobile Classroom
Old Vs New A New Approach To A Mobile Classroom
 
Sketch my ideas
Sketch my ideasSketch my ideas
Sketch my ideas
 
Gel Electrophoresis
Gel ElectrophoresisGel Electrophoresis
Gel Electrophoresis
 
Luxury Complex
Luxury ComplexLuxury Complex
Luxury Complex
 
Disrupting Complacency - It Only Works Until It Doesn't
Disrupting Complacency - It Only Works Until It Doesn'tDisrupting Complacency - It Only Works Until It Doesn't
Disrupting Complacency - It Only Works Until It Doesn't
 
The Really Smelly Prince
The Really Smelly PrinceThe Really Smelly Prince
The Really Smelly Prince
 
Php through the eyes of a hoster pbc10
Php through the eyes of a hoster pbc10Php through the eyes of a hoster pbc10
Php through the eyes of a hoster pbc10
 
Anurag&Rupali
Anurag&RupaliAnurag&Rupali
Anurag&Rupali
 
The Disconnect: Reasons Companies fail at Social Media and how to Succeed
The Disconnect: Reasons Companies fail at Social Media and how to SucceedThe Disconnect: Reasons Companies fail at Social Media and how to Succeed
The Disconnect: Reasons Companies fail at Social Media and how to Succeed
 
Pengembangan Kawasan Andalan Riau
Pengembangan Kawasan Andalan RiauPengembangan Kawasan Andalan Riau
Pengembangan Kawasan Andalan Riau
 
Novo manuel d’activités d’éducation pour l’enfance
Novo manuel d’activités d’éducation pour l’enfanceNovo manuel d’activités d’éducation pour l’enfance
Novo manuel d’activités d’éducation pour l’enfance
 
The Complete Sentence Ppt
The Complete Sentence PptThe Complete Sentence Ppt
The Complete Sentence Ppt
 
Entrepreneurship In Corporations
Entrepreneurship In CorporationsEntrepreneurship In Corporations
Entrepreneurship In Corporations
 
Mobiles by Julie Frith
Mobiles by Julie FrithMobiles by Julie Frith
Mobiles by Julie Frith
 
Exa profile & products
Exa profile & products Exa profile & products
Exa profile & products
 
Contratação escola aviso nº 7 grupo 510
Contratação escola aviso nº 7  grupo 510Contratação escola aviso nº 7  grupo 510
Contratação escola aviso nº 7 grupo 510
 
things in nature
things in naturethings in nature
things in nature
 
Greenland Prpoerty Mgt
Greenland Prpoerty MgtGreenland Prpoerty Mgt
Greenland Prpoerty Mgt
 

Similar a Varnish in action pbc10

Varnish Web Accelerator
Varnish Web AcceleratorVarnish Web Accelerator
Varnish Web AcceleratorRahul Ghose
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialTom Croucher
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyLeif Hedstrom
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloPer Buer
 
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
In-depth caching in Varnish - GOG Varnish Meetup, march 2019In-depth caching in Varnish - GOG Varnish Meetup, march 2019
In-depth caching in Varnish - GOG Varnish Meetup, march 2019GOG.com dev team
 
Pre New Year Check of PostgreSQL
Pre New Year Check of PostgreSQLPre New Year Check of PostgreSQL
Pre New Year Check of PostgreSQLAndrey Karpov
 
MongoDB Days Silicon Valley: MongoDB and the Hadoop Connector
MongoDB Days Silicon Valley: MongoDB and the Hadoop ConnectorMongoDB Days Silicon Valley: MongoDB and the Hadoop Connector
MongoDB Days Silicon Valley: MongoDB and the Hadoop ConnectorMongoDB
 
How to debug ocfs2 hang problem
How to debug ocfs2 hang problemHow to debug ocfs2 hang problem
How to debug ocfs2 hang problemGang He
 
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance FuckupsNETFest
 
Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com confluent
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 PresentationSreenivas Makam
 
Open daylight and Openstack
Open daylight and OpenstackOpen daylight and Openstack
Open daylight and OpenstackDave Neary
 
Debugging your varnish instance
Debugging your varnish instanceDebugging your varnish instance
Debugging your varnish instanceVarnish Software
 
OpenStack networking
OpenStack networkingOpenStack networking
OpenStack networkingSim Janghoon
 

Similar a Varnish in action pbc10 (20)

Varnish - PLNOG 4
Varnish - PLNOG 4Varnish - PLNOG 4
Varnish - PLNOG 4
 
Varnish Web Accelerator
Varnish Web AcceleratorVarnish Web Accelerator
Varnish Web Accelerator
 
OSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js TutorialOSCON 2011 - Node.js Tutorial
OSCON 2011 - Node.js Tutorial
 
Debugging varnish
Debugging varnishDebugging varnish
Debugging varnish
 
Usenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a ProxyUsenix LISA 2012 - Choosing a Proxy
Usenix LISA 2012 - Choosing a Proxy
 
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in OsloVarnish Cache 4.0 / Redpill Linpro breakfast in Oslo
Varnish Cache 4.0 / Redpill Linpro breakfast in Oslo
 
Debugging TV Frame 0x11
Debugging TV Frame 0x11Debugging TV Frame 0x11
Debugging TV Frame 0x11
 
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
In-depth caching in Varnish - GOG Varnish Meetup, march 2019In-depth caching in Varnish - GOG Varnish Meetup, march 2019
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
 
Pre New Year Check of PostgreSQL
Pre New Year Check of PostgreSQLPre New Year Check of PostgreSQL
Pre New Year Check of PostgreSQL
 
MongoDB Days Silicon Valley: MongoDB and the Hadoop Connector
MongoDB Days Silicon Valley: MongoDB and the Hadoop ConnectorMongoDB Days Silicon Valley: MongoDB and the Hadoop Connector
MongoDB Days Silicon Valley: MongoDB and the Hadoop Connector
 
How to debug ocfs2 hang problem
How to debug ocfs2 hang problemHow to debug ocfs2 hang problem
How to debug ocfs2 hang problem
 
Node.js concurrency
Node.js concurrencyNode.js concurrency
Node.js concurrency
 
Run Node Run
Run Node RunRun Node Run
Run Node Run
 
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
.NET Fest 2019. Łukasz Pyrzyk. Daily Performance Fuckups
 
Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com Data Streaming Ecosystem Management at Booking.com
Data Streaming Ecosystem Management at Booking.com
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 
Open daylight and Openstack
Open daylight and OpenstackOpen daylight and Openstack
Open daylight and Openstack
 
Debugging your varnish instance
Debugging your varnish instanceDebugging your varnish instance
Debugging your varnish instance
 
OpenStack networking
OpenStack networkingOpenStack networking
OpenStack networking
 
Varnish qconsp 2011
Varnish qconsp 2011Varnish qconsp 2011
Varnish qconsp 2011
 

Más de Combell NV

Play it extra safe! Kies een goede cyberverzekering
Play it extra safe! Kies een goede cyberverzekeringPlay it extra safe! Kies een goede cyberverzekering
Play it extra safe! Kies een goede cyberverzekeringCombell NV
 
Hoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van CombellHoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van CombellCombell NV
 
Managed WordPress bij Combell – wat doet dat precies?
Managed WordPress bij Combell – wat doet dat precies?Managed WordPress bij Combell – wat doet dat precies?
Managed WordPress bij Combell – wat doet dat precies?Combell NV
 
Back-ups: Hoe ze je kunnen redden van een cyberaanval
Back-ups: Hoe ze je kunnen redden van een cyberaanvalBack-ups: Hoe ze je kunnen redden van een cyberaanval
Back-ups: Hoe ze je kunnen redden van een cyberaanvalCombell NV
 
Cyberaanvallen: Overzicht, gevolgen en beveiligingstips
Cyberaanvallen: Overzicht, gevolgen en beveiligingstipsCyberaanvallen: Overzicht, gevolgen en beveiligingstips
Cyberaanvallen: Overzicht, gevolgen en beveiligingstipsCombell NV
 
Hoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van CombellHoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van CombellCombell NV
 
Hoe laat je jouw website scoren in zoekmachines zoals Google
Hoe laat je jouw website scoren in zoekmachines zoals GoogleHoe laat je jouw website scoren in zoekmachines zoals Google
Hoe laat je jouw website scoren in zoekmachines zoals GoogleCombell NV
 
Een webshop bouwen in WooCommerce – advanced sessie
Een webshop bouwen in WooCommerce – advanced sessieEen webshop bouwen in WooCommerce – advanced sessie
Een webshop bouwen in WooCommerce – advanced sessieCombell NV
 
Hoe start je een webshop met WordPress / WooCommerce
Hoe start je een webshop met WordPress / WooCommerceHoe start je een webshop met WordPress / WooCommerce
Hoe start je een webshop met WordPress / WooCommerceCombell NV
 
Keeping the cloud in check cvodmd
Keeping the cloud in check cvodmdKeeping the cloud in check cvodmd
Keeping the cloud in check cvodmdCombell NV
 
Hybrid cloud wiskyweb2012
Hybrid cloud wiskyweb2012Hybrid cloud wiskyweb2012
Hybrid cloud wiskyweb2012Combell NV
 
2012 03-27 developers e-commercedag presentatie5 ssl
2012 03-27 developers e-commercedag presentatie5 ssl2012 03-27 developers e-commercedag presentatie5 ssl
2012 03-27 developers e-commercedag presentatie5 sslCombell NV
 
2012 03-27 developers e-commercedag presentatie2 drupal
2012 03-27 developers e-commercedag presentatie2 drupal2012 03-27 developers e-commercedag presentatie2 drupal
2012 03-27 developers e-commercedag presentatie2 drupalCombell NV
 
2012 03-27 developers e-commercedag presentatie1 magento
2012 03-27 developers e-commercedag presentatie1 magento2012 03-27 developers e-commercedag presentatie1 magento
2012 03-27 developers e-commercedag presentatie1 magentoCombell NV
 
2012 03-27 developers e-commercedag presentatie4 ogone
2012 03-27 developers e-commercedag presentatie4 ogone2012 03-27 developers e-commercedag presentatie4 ogone
2012 03-27 developers e-commercedag presentatie4 ogoneCombell NV
 
10 doe-het-zelf tips om aan e-commerce te doen
10 doe-het-zelf tips om aan e-commerce te doen10 doe-het-zelf tips om aan e-commerce te doen
10 doe-het-zelf tips om aan e-commerce te doenCombell NV
 
Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Combell NV
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confooCombell NV
 
Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Combell NV
 
2012 02-07 sql denali presentatie microsoft
2012 02-07 sql denali presentatie microsoft2012 02-07 sql denali presentatie microsoft
2012 02-07 sql denali presentatie microsoftCombell NV
 

Más de Combell NV (20)

Play it extra safe! Kies een goede cyberverzekering
Play it extra safe! Kies een goede cyberverzekeringPlay it extra safe! Kies een goede cyberverzekering
Play it extra safe! Kies een goede cyberverzekering
 
Hoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van CombellHoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van Combell
 
Managed WordPress bij Combell – wat doet dat precies?
Managed WordPress bij Combell – wat doet dat precies?Managed WordPress bij Combell – wat doet dat precies?
Managed WordPress bij Combell – wat doet dat precies?
 
Back-ups: Hoe ze je kunnen redden van een cyberaanval
Back-ups: Hoe ze je kunnen redden van een cyberaanvalBack-ups: Hoe ze je kunnen redden van een cyberaanval
Back-ups: Hoe ze je kunnen redden van een cyberaanval
 
Cyberaanvallen: Overzicht, gevolgen en beveiligingstips
Cyberaanvallen: Overzicht, gevolgen en beveiligingstipsCyberaanvallen: Overzicht, gevolgen en beveiligingstips
Cyberaanvallen: Overzicht, gevolgen en beveiligingstips
 
Hoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van CombellHoe gebruik je het resellerplatform als partner van Combell
Hoe gebruik je het resellerplatform als partner van Combell
 
Hoe laat je jouw website scoren in zoekmachines zoals Google
Hoe laat je jouw website scoren in zoekmachines zoals GoogleHoe laat je jouw website scoren in zoekmachines zoals Google
Hoe laat je jouw website scoren in zoekmachines zoals Google
 
Een webshop bouwen in WooCommerce – advanced sessie
Een webshop bouwen in WooCommerce – advanced sessieEen webshop bouwen in WooCommerce – advanced sessie
Een webshop bouwen in WooCommerce – advanced sessie
 
Hoe start je een webshop met WordPress / WooCommerce
Hoe start je een webshop met WordPress / WooCommerceHoe start je een webshop met WordPress / WooCommerce
Hoe start je een webshop met WordPress / WooCommerce
 
Keeping the cloud in check cvodmd
Keeping the cloud in check cvodmdKeeping the cloud in check cvodmd
Keeping the cloud in check cvodmd
 
Hybrid cloud wiskyweb2012
Hybrid cloud wiskyweb2012Hybrid cloud wiskyweb2012
Hybrid cloud wiskyweb2012
 
2012 03-27 developers e-commercedag presentatie5 ssl
2012 03-27 developers e-commercedag presentatie5 ssl2012 03-27 developers e-commercedag presentatie5 ssl
2012 03-27 developers e-commercedag presentatie5 ssl
 
2012 03-27 developers e-commercedag presentatie2 drupal
2012 03-27 developers e-commercedag presentatie2 drupal2012 03-27 developers e-commercedag presentatie2 drupal
2012 03-27 developers e-commercedag presentatie2 drupal
 
2012 03-27 developers e-commercedag presentatie1 magento
2012 03-27 developers e-commercedag presentatie1 magento2012 03-27 developers e-commercedag presentatie1 magento
2012 03-27 developers e-commercedag presentatie1 magento
 
2012 03-27 developers e-commercedag presentatie4 ogone
2012 03-27 developers e-commercedag presentatie4 ogone2012 03-27 developers e-commercedag presentatie4 ogone
2012 03-27 developers e-commercedag presentatie4 ogone
 
10 doe-het-zelf tips om aan e-commerce te doen
10 doe-het-zelf tips om aan e-commerce te doen10 doe-het-zelf tips om aan e-commerce te doen
10 doe-het-zelf tips om aan e-commerce te doen
 
Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012Develop and deploy using Hybrid Cloud Strategies confoo2012
Develop and deploy using Hybrid Cloud Strategies confoo2012
 
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confooPhp through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
 
Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012Hybrid Cloud PHPUK2012
Hybrid Cloud PHPUK2012
 
2012 02-07 sql denali presentatie microsoft
2012 02-07 sql denali presentatie microsoft2012 02-07 sql denali presentatie microsoft
2012 02-07 sql denali presentatie microsoft
 

Último

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Último (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Varnish in action pbc10

  • 1. Varnish  in  ac*on Thijs  Feryn Support  manager +32  (0)9  218  79  06 thijs@combellgroup.com PHP  Barcelona  Conference Friday  October  29th  2010 Barcelona  Spain
  • 2. About  me I’m  the  support  manager  at  Combell
  • 3. About  me I’m  a  board  member  at  PHPBenelux
  • 4. I  live  in  the  wonderful  city  of  Bruges MPBecker  -­‐  Bruges  by  Night  hUp://www.flickr.com/photos/galverson2/3715965933
  • 5. Follow  me  on  TwiUer:  @ThijsFeryn Read  my  blog:  hUp://blog.feryn.eu
  • 6.
  • 11. Caching Storing  computed  data  for  faster   serving  of  future  requests
  • 12. Basically Puang  stuff  in  boxes  for  later  use
  • 13. Why?
  • 15. In  the  beginning  there  was  ...
  • 17. Browser  cache:  expira*on Expires:  Sun,  25  Jun  2006  14:57:12   Cache-­‐Control:  max-­‐age=86400,   must-­‐revalidate
  • 18. Browser  cache:  valida*on Last-­‐Modified:  Sun,  25  Jun  2006  14:57:12  GMT ETag:  “686897696a7c876b7e”
  • 19. Browser  cache:  valida*on Last-­‐Modified:  Sun,  25  Jun  2006  14:57:12  GMT ETag:  “686897696a7c876b7e” Compared  with  the  “If-­‐None-­‐Match”  header.   Throws  “HTTP/1.0  304  Not  Modified”  accordingly
  • 21. Browser  cache:  in  PHP <?php $seconds = 10; $expires = gmdate('D, j M Y H:i:s T', time() + $seconds); header("Expires: $expires"); header("Cache-Control: max-age=$seconds, must-revalidate"); ?> <ul>     <li>Current date/time: <?= gmdate('D, j M Y H:i:s T')?></li>     <li>Expires: <?= $expires ?></li>     <li>Cache-control: <?= $seconds?> seconds</li> </ul>
  • 23. Browser  cache:  in  Apache ExpiresAc*ve  on ExpiresDefault  "access  plus  1  month" ExpiresDefault  "now  plus  4  weeks" ExpiresDefault  "modifica*on  plus  30  days" ExpiresByType  text/html  "access  plus  1  month  15  days  2  hours" ExpiresByType  image/gif  "modifica*on  plus  5  hours  3  minutes"
  • 24. Browser  cache  is  your  friend  !
  • 26. Problems  with  browser  cache Mul*ple  standards Can  be  ignored  by  browser Force  refresh Cache  per  client
  • 27. Solu*ons:  use  a  caching/reverse  proxy! Use  a  caching/reverse  proxy Varnish  does  that It’ll  make  your  site  fly!
  • 28. Info •Website:  hUp://www.varnish-­‐cache.org •Wiki:  hUp://www.varnish-­‐cache.org/trac/wiki •Examples:  hUp://www.varnish-­‐cache.org/trac/wiki/VCLExamples •DocumentaHon  site:  hUp://www.varnish-­‐cache.org/docs/2.1  
  • 30. Setup  Varnish DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl -s file,/var/lib/varnish/$INSTANCE/ varnish_storage.bin,1G" In  “/etc/default/varnish”
  • 32. Setup  the  backend backend default { .host = "127.0.0.1"; .port = "8080"; } In  “/etc/varnish/default.vcl”
  • 33. Setup  the  backend Listen 8080 In  “/etc/apache2/ports.conf”
  • 34. Out  of  the  box  Varnish  will  only  ...
  • 35. ...  obey  your  caching  headers
  • 36. ...  and  cache  sta*c  files
  • 38. Request vcl_recv In cache? vcl_hash Cacheable? vcl_hit() vcl_miss() vcl_deliver() vcl_fetch() No Yes NoYes Response
  • 41. Varnishstat Real  *me  stats  of  running  varnishd  instance hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishstat.html
  • 42. Hitrate  ratio:              10            100            121 Hitrate  avg:          0.5365      0.5287      0.5277                9957                  0.00                  4.10  Client  connections  accepted              58932                67.92                24.28  Client  requests  received              30483                  1.00                12.56  Cache  hits                8592                  0.00                  3.54  Cache  hits  for  pass              18991                66.92                  7.82  Cache  misses              28449                66.92                11.72  Backend  connections  success              22562                66.92                  9.30  Backend  connections  reuses              28357                66.92                11.68  Backend  connections  recycles                  488                    .                        .      N  struct  srcaddr                      7                    .                        .      N  active  struct  srcaddr                    81                    .                        .      N  struct  sess_mem                    21                    .                        .      N  struct  sess                4398                    .                        .      N  struct  object                4401                    .                        .      N  struct  objecthead                9220                    .                        .      N  struct  smf                  355                    .                        .      N  small  free  smf                      6                    .                        .      N  large  free  smf                      2                    .                        .      N  struct  vbe_conn                    10                    .                        .      N  struct  bereq                    17                    .                        .      N  worker  threads                    28                  0.00                  0.01  N  worker  threads  created                  164                  0.00                  0.07  N  overflowed  work  requests                      1                    .                        .      N  backends              14608                    .                        .      N  expired  objects              24113                    .                        .      N  LRU  moved  objects              53778                66.92                22.16  Objects  sent  with  write                9957                  0.00                  4.10  Total  Sessions              58935                67.92                24.28  Total  Requests                9458                  0.00                  3.90  Total  pass              28445                66.92                11.72  Total  fetch        22496844          23506.62            9269.40  Total  header  bytes      606897837        263427.01        250060.91  Total  body  bytes                1384                  0.00                  0.57  Session  Closed
  • 43. Varnishlog Display  requests  of  running  varnishd  instance hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishlog.html
  • 44. Notable  tags Varnishlog • RxHeader • RxLostHeader • RxProtocol • RxRequest • RxResponse • RxStatus • RxURL • TxHeader • TxLostHeader • TxProtocol • TxRequest • TxResponse • TxStatus • TxURL • ReqEnd • ReqStart • Hit • Error • VCL_call • VCL_return • VCL_acl
  • 45. Varnishlog varnishlog  -­‐c  -­‐o  RxRequest  POST All  POST  requests
  • 46. Varnishlog varnishlog  -­‐c  -­‐i  RxHeader  -­‐I  ^User-­‐Agent All  user  agents
  • 47. Varnishlog varnishlog  -­‐i  TxURL All  URL’s  that  “missed”
  • 48. Varnishlog varnishlog    -­‐o  VCL_call  hit  |  grep  RxURL All  URL’s  that  “hit”
  • 49. Varnishlog varnishlog    -­‐w  /tmp/yourfile.log Write  log  to  file varnishlog    -­‐r  /tmp/yourfile.log Read  log  from  file
  • 50.      12  SessionOpen    c  172.16.26.1  50396  :8080      12  ReqStart          c  172.16.26.1  50396  668213522      12  RxRequest        c  GET      12  RxURL                c  /test.php      12  RxProtocol      c  HTTP/1.1      12  RxHeader          c  Host:  varnish.dev:8080      12  RxHeader          c  User-­‐Agent:  Mozilla/5.0  (Macintosh;  U;  Intel  Mac  OS  X  10.6;  nl;   rv:1.9.2.10)  Gecko/20100914  Firefox/3.6.10      12  RxHeader          c  Accept:  text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8      12  RxHeader          c  Accept-­‐Language:  nl,en-­‐us;q=0.7,en;q=0.3      12  RxHeader          c  Accept-­‐Encoding:  gzip,deflate      12  RxHeader          c  Accept-­‐Charset:  ISO-­‐8859-­‐1,utf-­‐8;q=0.7,*;q=0.7      12  RxHeader          c  Keep-­‐Alive:  115      12  RxHeader          c  Connection:  keep-­‐alive      12  RxHeader          c  Cookie:  PHPSESSID=2n2pkit81qdgk6k4trf1crft16      12  VCL_call          c  recv      12  VCL_return      c  pass      12  VCL_call          c  hash      12  VCL_return      c  hash      12  VCL_call          c  pass      12  VCL_return      c  pass      14  BackendClose  -­‐  default      14  BackendOpen    b  default  127.0.0.1  34267  127.0.0.1  80      12  Backend            c  14  default  default
  • 51.      14  TxRequest        b  GET      14  TxURL                b  /test.php      14  TxProtocol      b  HTTP/1.1      14  TxHeader          b  Host:  varnish.dev:8080      14  TxHeader          b  User-­‐Agent:  Mozilla/5.0  (Macintosh;  U;  Intel  Mac  OS  X  10.6;  nl;   rv:1.9.2.10)  Gecko/20100914  Firefox/3.6.10      14  TxHeader          b  Accept:  text/html,application/xhtml+xml,application/xml;q=0.9,*/ *;q=0.8      14  TxHeader          b  Accept-­‐Language:  nl,en-­‐us;q=0.7,en;q=0.3      14  TxHeader          b  Accept-­‐Encoding:  gzip,deflate      14  TxHeader          b  Accept-­‐Charset:  ISO-­‐8859-­‐1,utf-­‐8;q=0.7,*;q=0.7      14  TxHeader          b  Cookie:  PHPSESSID=2n2pkit81qdgk6k4trf1crft16      14  TxHeader          b  X-­‐Forwarded-­‐For:  172.16.26.1      14  TxHeader          b  X-­‐Varnish:  668213522      14  RxProtocol      b  HTTP/1.1      14  RxStatus          b  200      14  RxResponse      b  OK      14  RxHeader          b  Date:  Tue,  19  Oct  2010  12:54:49  GMT      14  RxHeader          b  Server:  Apache/2.2.16  (Ubuntu)      14  RxHeader          b  X-­‐Powered-­‐By:  PHP/5.3.3-­‐1ubuntu9      14  RxHeader          b  Vary:  Accept-­‐Encoding      14  RxHeader          b  Content-­‐Encoding:  gzip      14  RxHeader          b  Content-­‐Length:  36      14  RxHeader          b  Content-­‐Type:  text/html
  • 52.      12  TTL                    c  668213522  RFC  120  1287492889  0  0  0  0      12  VCL_call          c  fetch      12  TTL                    c  668213522  VCL  10  1287492889      12  VCL_return      c  pass      12  ObjProtocol    c  HTTP/1.1      12  ObjStatus        c  200      12  ObjResponse    c  OK      12  ObjHeader        c  Date:  Tue,  19  Oct  2010  12:54:49  GMT      12  ObjHeader        c  Server:  Apache/2.2.16  (Ubuntu)      12  ObjHeader        c  X-­‐Powered-­‐By:  PHP/5.3.3-­‐1ubuntu9      12  ObjHeader        c  Vary:  Accept-­‐Encoding      12  ObjHeader        c  Content-­‐Encoding:  gzip      12  ObjHeader        c  Content-­‐Type:  text/html      14  Length              b  36      14  BackendReuse  b  default      12  VCL_call          c  deliver      12  VCL_return      c  deliver      12  TxProtocol      c  HTTP/1.1      12  TxStatus          c  200      12  TxResponse      c  OK      12  TxHeader          c  Server:  Apache/2.2.16  (Ubuntu)      12  TxHeader          c  X-­‐Powered-­‐By:  PHP/5.3.3-­‐1ubuntu9      12  TxHeader          c  Vary:  Accept-­‐Encoding      12  TxHeader          c  Content-­‐Encoding:  gzip      12  TxHeader          c  Content-­‐Type:  text/html      12  TxHeader          c  Content-­‐Length:  36      12  TxHeader          c  Date:  Tue,  19  Oct  2010  12:54:49  GMT      12  TxHeader          c  X-­‐Varnish:  668213522      12  TxHeader          c  Age:  0      12  TxHeader          c  Via:  1.1  varnish
  • 53. Varnishtop Read  memory  logs  and  presents  them  as  a   con*nuously  updated  list  of  commonly   occuring  log  entries hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishtop.html
  • 54. Varnishtop varnishtop  -­‐i  RxHeader  -­‐I  ^User-­‐Agent Get  the  top  user  agents
  • 55. Varnishtop varnishtop  -­‐i  RxRequest Get  the  top  request  methods
  • 57. list  length  90                                                                                                                                                     dev        76.42  VCL_return          pass              50.95  RxProtocol          HTTP/1.1        50.95  TxProtocol          HTTP/1.1        27.54  Length                  110        25.48  Debug                    herding        25.47  RxRequest            GET        25.47  RxHeader              Host:  varnish.dev:8080        25.47  RxHeader              User-­‐Agent:  Mozilla/5.0  (Macintosh;  U;  Intel  Mac  OS  X  10.6;  nl; rv:1.9.2.10)  Gecko/20100914  Firefox/3.6.10        25.47  RxHeader              Accept:  text/html,application/xhtml+xml,application/ xml;q=0.9,*/*;q=0.8        25.47  RxHeader              Accept-­‐Language:  nl,en-­‐us;q=0.7,en;q=0.3        25.47  RxHeader              Accept-­‐Encoding:  gzip,deflate        25.47  RxHeader              Accept-­‐Charset:  ISO-­‐8859-­‐1,utf-­‐8;q=0.7,*;q=0.7        25.47  RxHeader              Keep-­‐Alive:  115        25.47  RxHeader              Connection:  keep-­‐alive        25.47  RxHeader              Cookie:  PHPSESSID=2n2pkit81qdgk6k4trf1crft16        25.47  VCL_call              recv        25.47  VCL_call              hash        25.47  VCL_return          hash        25.47  VCL_call              pass        25.47  Backend                14  default  default        25.47  TxRequest            GET        25.47  TxHeader              Host:  varnish.dev:8080        25.47  TxHeader              User-­‐Agent:  Mozilla/5.0  (Macintosh;  U;  Intel  Mac  OS  X  10.6;  nl; rv:1.9.2.10)  Gecko/20100914  Firefox/3.6.10        25.47  TxHeader              Accept:  text/html,application/xhtml+xml,application/
  • 58. Varnishncsa Read  memory  logs  and  presents  them  in  the   Apache  /  NCSA  “combined”  log  format hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishncsa.html
  • 59. Varnishncsa varnishncsa  -­‐D  -­‐a  -­‐w  /var/log/some.log 172.16.26.1  -­‐  -­‐  [19/Oct/2010:16:08:02  +0200]  "GET  hUp:// varnish.dev:8080/  HTTP/1.1"  200  97  "-­‐"  "Mozilla/5.0  (Macintosh;  U;   Intel  Mac  OS  X  10.6;  nl;  rv:1.9.2.10)  Gecko/20100914  Firefox/3.6.10" 172.16.26.1  -­‐  -­‐  [19/Oct/2010:16:08:10  +0200]  "GET  hUp:// varnish.dev:8080/test.php  HTTP/1.1"  200  36  "-­‐"  "Mozilla/5.0   (Macintosh;  U;  Intel  Mac  OS  X  10.6;  nl;  rv:1.9.2.10)  Gecko/20100914   Firefox/3.6.10"
  • 60. Varnishreplay The  varnishreplay  u*lity  parses  varnish  logs  and   aUempts  to  reproduce  the  traffic hUp://www.varnish-­‐cache.org/docs/2.1/reference/varnishreplay.html
  • 61. Varnishreplay varnishlog    -­‐w  /tmp/yourfile.log varnishreplay    -­‐r  /tmp/yourfile.log
  • 63. Management  via  telnet root@dev:/#  telnet  localhost  6082 Trying  ::1... Connected  to  localhost. Escape  character  is  '^]'. 200  154           -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ Varnish  HTTP  accelerator  CLI. -­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐-­‐ Type  'help'  for  command  list. Type  'quit'  to  close  CLI  session.
  • 64. Notable  ac*ons Management  via  telnet • vcl.load  <configname>  <filename> • vcl.use  <configname> • vcl.discard  <configname> • vcl.list • vcl.show  <configname> Avoid  interrup*on
  • 66. Request vcl_recv In cache? vcl_hash Cacheable? vcl_hit() vcl_miss() vcl_deliver() vcl_fetch() No Yes NoYes Response
  • 67. sub vcl_recv { if ( (req.request == "GET" || req.request == "HEAD") && req.url ~ ".(png|gif|jpe?g|swf|css|js|html?|sstm) $" ) { return(lookup); } else { return(pass); } } Cache  sta*c  files
  • 68. sub vcl_deliver { if (obj.hits > 0) { set resp.http.X-Cache = "HIT"; } else { set resp.http.X-Cache = "MISS"; } } Provide  HIT/MISS  informa*on
  • 69. sub vcl_fetch { set beresp.ttl = 10s; } Manipulate  TTL
  • 70. sub vcl_recv { if (req.request == "GET" || req.request == "HEAD") { return (lookup); } } sub vcl_hash { if (req.http.Cookie) { set req.hash += req.http.Cookie; } } Cache  ...  even  with  cookies
  • 71. sub vcl_recv { unset req.http.cookie; } sub vcl_fetch { unset beresp.http.set-cookie; } Remove  cookies
  • 72. sub vcl_recv { if (req.http.Cookie) { set req.http.Cookie = regsuball (req.http.Cookie,"(^|; ) *__utm.=[^;]+;? *","1"); if (req.http.Cookie == "") { remove req.http.Cookie; } } Remove  Google  Analy*cs  cookies
  • 73. backend default { .host = "default.server.com"; .port = "80"; } backend other { .host = "other.server.com"; .port = "80"; } sub vcl_recv { if(req.http.host ~ "^www."){ set req.backend= default; } else { set req.backend = other; } } Mul*ple  backends:  hostname  filtering
  • 74. Default backend Other backend www.example.com example.com
  • 75. sub vcl_recv { if (req.backend.healthy) { set req.grace = 1s; } else { set req.grace = 10s; } } Grace  mode Keep  reading  from  cache,   even  when  expired
  • 76. backend default { .host = "default.server.com"; .port = "80"; .probe = { .url = "/"; .timeout = 50 ms; .interval = 1s; .window = 2; .threshold = 2; } } Mul*ple  backends:  health  checks
  • 77. backend other { .host = "other.server.com"; .port = "80"; .probe = { .url = "/"; .timeout = 50 ms; .interval = 1s; .window = 2; .threshold = 2; } } Mul*ple  backends:  health  checks
  • 78. sub vcl_recv { if (req.restarts == 0) { set req.backend = default; } else { set req.backend = other; } return(pass); } sub vcl_error { if (obj.status == 503 && req.restarts < 4) { restart; } } Mul*ple  backends:  health  checks
  • 81. director back round-robin { {.backend = default;} {.backend = other;} } sub vcl_recv { set req.backend = back; return(pass); } Loadbalancing  via  directors
  • 82. Default backend Other backend 50% 50%
  • 83. director back random { {.backend = default; .weight=1;} {.backend = other; .weight=2;} } sub vcl_recv { set req.backend = back; return(pass); } Loadbalancing  via  directors
  • 84. Default backend Other backend 33% 66%
  • 85. acl purge_acl { "localhost"; "1.2.3.4"; "some.host.ext"; } sub vcl_recv { if (req.request == "PURGE") { if (!client.ip ~ purge_acl) { error 405 "Not allowed."; } purge_url(req.url); error 200 "Purged."; } return(lookup); } Purging curl  -­‐X  PURGE  hUp://yoursite.com/yourpage
  • 86. Edge  Side  Includes:  the  final  piece  of  the  puzzle
  • 91. <html> <body> <table> <tr colspan="2"> <td><esi:include src="/header.php" /></td> </tr> <tr> <td><esi:include src="/menu.php" /></td> <td><esi:include src="/main.php" /></td> </tr> <tr colspan="2"> <td><esi:include src="/footer.php" /></td> </tr> </table> </body> </html>
  • 92. sub vcl_recv { if(req.url == "/header.php") { return (pass); } if(req.url ~ "^/(footer|main|menu).php$") { return (lookup); } } sub vcl_fetch { if (beresp.http.esi-enabled == "1") { esi; unset beresp.http.esi-enabled; } if(req.url == "/footer.php") { set beresp.ttl = 5s; } if(req.url == "/menu.php") { set beresp.ttl = 10s; } if(req.url == "/main.php") { set beresp.ttl = 2s; } }
  • 93.
  • 94. Enough  ac*on,  *me  to  relax  ...
  • 95.
  • 96.
  • 97. Q&A