Perhaps the most important performance metric is the hitrate.
Varnish routes it's incoming requests like this:
missdepending on the state of the cache.
A hash with a
miss and a
hitpass will be fetched from the server backend and delivered. A hash with a
hit will be delivered directly from the cache.
Metrics to monitor:
varnishstat -1 | grep "cache_hit \|cache_miss \|cache_hitpass" MAIN.cache_hit 99032838 5.36 Cache hits MAIN.cache_hitpass 0 0.00 Cache hits for pass MAIN.cache_miss 42484195 2.30 Cache misses
Calculate the actual hitrate like this:
cache_hit / (cache_hit + cache_miss)
In this example the hitrate is 0.7 or 70%. You want to keep this as high as possible. 70% is a decent number. You can improve hitrate by increasing memory and customizing your vcl. Also monitor big changes in your hitrate.