Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
-
Upload
campdrupalua -
Category
Technology
-
view
1.964 -
download
2
description
Transcript of Petrov Olexandr.Varnish and drupal.DrupalCamp Kyiv 2011
15.6.11
Gold Sponsor ofDrupalCamp Kyiv 2011
15.6.11
Silver Sponsors ofDrupalCamp Kyiv 2011
What is Varnish and how it Works
Varnish caches backend responsesand delivers from the cache
Varnish stores cache entryfor each Host + URL
Pressflow
Pressflow = Drupal 6 with many performance tweaks
Pressflow allows:- Lazy sessions creation- No cookies for anonynous users
- Lots of Drupal 7 performance tweaks implemented
Pressflow Pros and Cons
Server Config
Tuning and administering Varnish
VCL - Varnish configuration language – allows to hook most of the events during handling requestsCommand line optionsVarnish Tools – cache viewer, stats viewer,
Varnish Configuration Language
C-like syntaxSupports regular expressionsGets translated to C code then compiled and executedHooks: vcl_recv, vcl_pipe, vcl_pass, vcl_hash, vcl_hit, vcl_miss, vcl_fetch, vcl_deliver, vcl_discard, vcl_errors
Code Example
backend image_server { .host = 127.0.0.1 .port = 1080}sub vcl_recv { #direct image requests to image server if(req.url ~ “(jpg|gif|png)”){ set req.backend = image_server; }}
Case StudiesNon-Drupal Websites
livejournal.com weather.com slideshare.netDrupal Websites drupal.org fusemusic.com
Read more
http://www.varnish-cache.orghttp://www.pressflow.orghttp://www.google.com