One aspect of Varnish that customers and enthusiasts most often ask questions about is how to make more effective use of Varnish’s powerful logging features. Logging and log management is important because your logs can be a real-time account of what is happening behind the scenes with your web traffic and transactions, resource performance, and much more. The detailed nature of logs lets you identify specific issues, anomalies or patterns and troubleshoot, sometimes getting to root causes of problems or seeing and stopping threats emerge before they can do any damage.
This blog post is part one of a two-part series. (Find part two here.)
Did you know that originally Quentin Tarantino's Kill Bill was supposed to be one four-hour movie? Later, he decided to make it a two-part deal, allowing him to give each part a very different feel and tone. It also happened to George RR Martin with the Storm of Swords book: it grew so big that he eventually had to split it in two volumes, so we don't have to read a 1,300-page book.
The cache hit rate is the percentage of requests that result in cache hits. In Varnish it is evaluated as cache_hit / (cache_hit + cache_miss). The higher the hit rate the more effective your cache is. For example if the hit rate is above 80%, it means the majority of requests are fulfilled by an object already present in cache and no backend request is made. This, of course, makes the response time shorter and reduces or completely avoids the chance that your backend will be overwhelmed.