<div dir="ltr"><div class="gmail_extra">Generally speaking, the varnish setup you are describing would use a hash director and not round-robin, so that the object would only be cached on one of your varnish nodes and therefore only require a single purge request.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">If your object lives on multiple nodes, then you could do something simple like send a HTTP request to <i>every</i> one of your hosts. This would require you to keep a list of your hosts and also create the appropriate permissions on all of your varnish instances: </div>
<div class="gmail_extra" style><br></div><font face="courier new, monospace">$ for i in `cat varnish_host.list`; do curl -XPURGE http://$i/object;done</font><br><div class="gmail_extra"><br></div><div class="gmail_extra">
I hope that helps. Maybe somebody can offer a better solution than myself.<br><br><div class="gmail_quote">On Tue, May 28, 2013 at 2:17 PM, Puneet <span dir="ltr"><<a href="mailto:puneet.arora@insticator.com" target="_blank">puneet.arora@insticator.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal">Hi All,<u></u><u></u></p><p class="MsoNormal">
<u></u> <u></u></p><p class="MsoNormal">I am using a Load Balancer (LB) in front of Varnish instances. Just say the LB is listening on Port: 80 and there are multiple instances of Varnish on different port nos.<u></u><u></u></p>
<p class="MsoNormal">i.e. I have a single LB which is connected to 4 instances of varnish, and LB is executing in a round-robin fashion. <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Now, how can I purge objects on Varnish and maintain consistency among different instances of Varnish.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p><span class="HOEnZb"><font color="#888888"><p class="MsoNormal">Puneet<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></font></span></div></div><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></blockquote></div><br></div></div>