View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
Varnish HTTP Caching Load FailoverAccelerator Reverse Proxy Balancer system „Varnish makes websites fly“
Varnish• 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/
Installation• In Ubuntu:sudo apt-get install varnishsudo vi /etc/default/varnishSTART=yessudo /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
855,78 Pages/SecondBenchmarks 3,45 10,72 Pages/Second Pages/Second TYPO3 TYPO3 TYPO3 without cache with cache with Varnish
Sending correct headers• 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