Hi Lasse,<div>Thanks! I forgot to mention this in the original email, but we are using varnish 2.1.5. Here is what I ended up doing:</div><div><br></div><div><div>sub vcl_fetch {</div><div> ...</div><div><br></div><div>
if (req.http.User-Agent ~ "(?i)(msn|google|bing|yandex|youdao|exa|mj12|omgili|flr-|ahrefs|blekko)bot" ||</div><div> req.http.User-Agent ~ "(?i)(magpie|mediapartners|sogou|baiduspider|nutch|yahoo.*slurp|genieo)") {</div>
<div> set beresp.http.X-Bot-Bypass = "YES";</div><div> set beresp.ttl = 0s;</div><div> return (pass);</div><div> }</div><div> </div><div> ...</div><div>}</div><div><br></div><div>The X-Bot-Bypass was just for testing this configuration. With this filtering and a lower ttl for some of our other objects, our nuking is now at 0. The hit rate hasn't changed, but I think we need more granularity in our hit rate metrics. For example, perhaps we should be looking at non-bot hitrates. </div>
<div><br></div><div>Thanks,</div><div>Damon</div><div><br></div><br><div class="gmail_quote">On Fri, Jul 20, 2012 at 3:44 AM, Lasse Karstensen <span dir="ltr"><<a href="mailto:lasse.karstensen@gmail.com" target="_blank">lasse.karstensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Lasse Karstensen:<br>
[..]<br>
<div class="im">> sub vcl_miss {<br>
> if (req.http.user-agent ~ "(?i)yandex|msnbot") {<br>
> return(pass);<br>
> }<br>
> }<br>
> You can probably use openddr/deviceatlas/$favorite_detectionengine to get<br>
> better accuracy than this regex.<br>
<br>
</div>I took at look at some access logs and updated devicedetect.vcl a bit so<br>
it has rudimentary bot detection:<br>
<br>
<a href="https://github.com/varnish/varnish-devicedetect/blob/master/devicedetect.vcl" target="_blank">https://github.com/varnish/varnish-devicedetect/blob/master/devicedetect.vcl</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
--<br>
Lasse Karstensen<br>
Varnish Software AS<br>
<a href="http://www.varnish-software.com/" target="_blank">http://www.varnish-software.com/</a><br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div><br></div>