<div class="gmail_extra">On Sat, Apr 21, 2012 at 3:47 PM, Rainer Duffner <span dir="ltr"><<a href="mailto:rainer@ultra-secure.de" target="_blank">rainer@ultra-secure.de</a>></span> wrote:</div><div class="gmail_extra">
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Sat, 21 Apr 2012 09:25:06 +0100<br>
schrieb Neil Saunders <<a href="mailto:n.j.saunders@gmail.com">n.j.saunders@gmail.com</a>>:<br>
<div class="im"><br>
> Hi all -<br>
><br>
> A two part question on cache sharing:<br>
><br>
> a) I've got 3 web servers each with a 3.5Gb memory cache. I'd like<br>
> them to share a cache but don't want to use the experimental<br>
> persistant storage backend - Are there any other options?<br>
<br>
<br>
</div>I think Java-software like ehcache (or some advanded derivative of<br>
it) can do that.<br>
But AFAIK, it requires close integration with the app that is cached.<br>
I don't think you can just bolt ehcache on top of stuff like you can do<br>
with varnish.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Rainer<br></font></span></blockquote><div><br></div><div class="gmail_extra">Hi all - </div><div class="gmail_extra"><br></div><div class="gmail_extra">I've tried implementing the web server chaining suggested above but have run in to a dead end. Broad configuration:</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">On all servers except the "last" in the chain I've defined:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">
backend next_web_server {</div><div class="gmail_extra"> .host = "<a href="http://webX.domain.com">webX.domain.com</a>";</div><div class="gmail_extra"> .port = "80";</div><div class="gmail_extra">
}</div><div class="gmail_extra"><br></div><div class="gmail_extra">And have added the following to vcl_recv:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"> if (req.http.X-Cache-Warming ~ "true") {</div>
<div class="gmail_extra"> set req.backend = next_web_server;</div><div class="gmail_extra"> set req.hash_always_miss = true;</div><div class="gmail_extra"> return(lookup);</div><div class="gmail_extra"> }</div>
<div class="gmail_extra"> </div><div class="gmail_extra"> set req.backend = system;</div><div class="gmail_extra">}</div><div class="gmail_extra"><br></div><div class="gmail_extra">And have the following vcl_hash:</div><div class="gmail_extra">
<br></div><div class="gmail_extra"><div class="gmail_extra">sub vcl_hash {</div><div class="gmail_extra"><br></div><div class="gmail_extra"> hash_data(req.url);</div><div class="gmail_extra"><br></div><div class="gmail_extra">
if (req.http.host) </div><div class="gmail_extra"> { </div><div class="gmail_extra"> hash_data(req.http.host); </div><div class="gmail_extra"> } </div><div class="gmail_extra"> </div><div class="gmail_extra"> return(hash);</div>
<div class="gmail_extra">}</div></div></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div>My issue is that all "real" requests (i.e. those without the X-Cache-Warming header following cache warming) are cache missing on all web servers except the last one (The one thats actually going to the real backend during cache warming) - It's like the backend name is being explicitly hashed, but can't see anything that would indicate what's going on in the documentation.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Any help appreciated!</div><div class="gmail_extra"><br></div><div class="gmail_extra">Ta,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Neil </div>
<div> </div></div><br></div>