I think that depends on all sorts of factors, especially including what your VCL says to Varnish to consider a hit, miss or pass.<div><br></div><div>Let's assume you used defaults, though. Half of the content on your staging site is being returned by Varnish with no backend calls required. That seems a good starting point to me. If it's a development site, then things will be changing a lot all the time I assume and you won't want some stuff (like auth) cached. If it's an ecommerce site, you'll want even less cached - eg checkout etc.</div><div><br></div>Instead of caring about your hit rate, I'd care more about your miss rate. These are the requests being sent to origin to respond via Varnish. And these are the requests that take up resources on your origin. Try to keep getting that lower, and you should be fine.<br><div><br></div><div>By the way - have you tried varnishstat? It's a good way to get all these stats out of Varnish.<br><br>On Monday, 1 December 2014, Tim Dunphy <<a href="mailto:bluethundr@gmail.com">bluethundr@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey guys,<div><br></div><div> We've setup some monitoring on a staging version of a production web site at work. It looks like we're getting about a .50 (or 50%) hit rate on the staging site. We haven't monitored the production site for varnish hit rates yet. We're using a Nagios check written in perl for that.</div><div><br></div><div>But if it's possible to think of this in general terms, what I'd like to know is if you think that .50 is a respectable hit rate for a php/drupal site that's basically not in production, and the traffic it encounters is synthetic. Basically it's tested out by the developers and load tests are run against it using load generators as you might expect. </div><div><br></div><div>And of course, some of the site content is dynamic and not meant to be cached.</div><div><br></div><div>Here's how it's broken down:</div><div><br></div><div>
<p><span>Cache_hit_percent=50.22</span></p>
<p><span></span><br></p>
<p><span>cache_hit 222628</span></p>
<p><span>cache_miss 220674</span></p>
<p><span></span><br></p>
<p><span>Here's we how calculate cache hit percent</span></p>
<p><span></span><br></p>
<p><span>cache_hit_percent = ( cache_hit / ( cache_hit + cache_miss ) ) * 100</span></p><p><span><br></span></p><p><span>So all I want to know from the more experienced varnish guys is, would you consider this an acceptable cache hit rate given my situation?</span></p><p><span><br></span></p><p><span>Thanks</span></p><p><span>Tim</span></p><div><br></div>-- <br><div>GPG me!!<br><br>gpg --keyserver <a href="http://pool.sks-keyservers.net" target="_blank">pool.sks-keyservers.net</a> --recv-keys F186197B<br><br></div>
</div></div>
</blockquote></div><br><br>-- <br><br>