3. • Who has any experience with Varnish?
• Who has a production site using Varnish?
• Who has played around with Varnish?
• Who has experience with any other
reverse proxy solution?
You?!
11. • Created by Poul-Henning Kamp
• Varnish Configuration Language (VCL)
– DSL, will be translated into C code and compiled
• Varnish uses thread and memory
management of the operation system
• Additional tools: varnishtop, varnishlog,…
• Online-Documentation:
http://www.varnish-cache.org/docs/2.1/
Varnish
16. • In Ubuntu:
sudo apt-get install varnish
sudo vi /etc/default/varnish
START=yes
sudo /etc/init.d varnish start
• Will be started automatically on boot
• Listens to port 6081 by default
• Uses 127.0.0.1:8080 as a backend by default
• /etc/varnish/default.vcl
Installation
24. • config.sendCacheHeaders = 1
• The conditions for allowing client caching are:
– page was cached
– No *_INT or *_EXT objects were on the page (eg.
USER_INT)
– No frontend user is logged in
– No backend user is logged in
• If these conditions are met, the headers sent are:
– Last-Modified [SYS_LASTCHANGED of page id]
– Expires [expire time of page cache]
– Etag [md5 of content]
– Cache-Control: max-age: [seconds til expiretime]
– Pragma: public
Sending correct headers