Hi Neil.<div><br><br><div class="gmail_quote">On Sat, Apr 21, 2012 at 10:25 AM, Neil Saunders <span dir="ltr"><<a href="mailto:n.j.saunders@gmail.com">n.j.saunders@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all -<div><br></div><div>A two part question on cache sharing:</div><div><br></div><div>a) I've got 3 web servers each with a 3.5Gb memory cache. I'd like them to share a cache but don't want to use the experimental persistant storage backend - Are there any other options?</div>
</blockquote><div><br></div><div>I don't think what you have in mind would work. Varnish requires an explicit lock on the files in manages. Sharing a cache between Varnish instances won't ever work.</div><div> </div>
<div>What I would recommend you do is to hash incoming requests based on URL so each time the same URL is hit it is served from the same server. That way you don't duplicate the content between caches. Varnish can do this, F5's can do it, haproxy should be able to do this as well.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>b) We run a cache warming script to ensure a certain set of URL's are always cached, but at the moment the script requests to all 3 web heads to ensure cache consistency - I see that Varnish supports PUT operations - Would it be feasible for the cache warmer to request content from webhead 1 and make a "PUT request to servers 2 & 3? I've searched high and low for documentation on this but can't find anything.</div>
</blockquote><div><br></div><div>No. Varnish requires a client requesting the data. But my solution above would take care of that.</div><div><br></div></div>-- <br><img src="http://www.varnish-software.com/sites/default/files/varnishsoft_white_190x47.png"><div>
Per Buer<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br><i>Varnish makes websites fly!</i><div><a href="http://www.varnish-software.com/whitepapers" target="_blank">Whitepapers</a> | <a href="http://www.youtube.com/watch?v=x7t2Sp174eI" target="_blank">Video</a> | <a href="https://twitter.com/varnishsoftware" target="_blank">Twitter</a> <br>
<br></div></div><br>
</div>