Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting the most out of Varnish (DrupalCamp Galway 2014)

Getting the most out of Varnish (DrupalCamp Galway 2014)

Best practices for tuning cache configuration
Recording: https://www.youtube.com/watch?v=u0G6PUe-n30&feature=youtu.be

Jochen Lillich

November 07, 2014

More Decks by Jochen Lillich

Other Decks in Technology


  1. Basics • Reverse HTTP caching proxy • Load balancing •

    High performance • No SSL • Avoids "Thundering herd" • Caching logic in VCL
  2. vcl_recv • Normalize and rewrite client input • Pick a

    backend web server • Decide caching policy • Access control
  3. vcl_hit • Right after an object has been found (hit)

    in the cache • You can change the TTL or issue purge • Often used to throw out an old object
  4. vcl_miss • Right after an object was looked up and

    not found in cache • Mostly used to issue purge • Can also be used to modify backend request headers
  5. vcl_pass • Run after a pass in vcl_recv or after

    a lookup that returned a hitpass • Not run after vcl_fetch
  6. vcl_deliver • Common last exit point for all (except vcl_pipe)

    code paths • Often used to add and remove debug-headers