Re: make varnish still respond if backend dead
Am Mittwoch 23 April 2008 19:34:14 schrieb Max Clark: Did you find a solution to this? not really, I hope to have found a workaround by adding this to my vcl: sub vcl_fetch { remove obj.http.X-Varnish-Host; setobj.http.X-Varnish-Host = myhostname; if (obj.status == 404) { set obj.ttl = 7200s; } } so 404 still may happen, but are cached shorter than my default. Cheers, Sascha On Fri, Apr 4, 2008 at 12:51 AM, Sascha Ottolski [EMAIL PROTECTED] wrote: Hi, sorry if this is FAQ: what can I do to make varnish respond to request if it's backend is dead. should return cache hits, of course, and a proxy error or something for a miss. and how can I prevent varnish to cache 404 for objects it couldn't fetch due to a dead backend? at least I think that is what happened, as varnish reported 404 for URLs that definetely exist; the dead backend seems to be the only logical explanation why varnish could think it's not. oh, and is there a way to put the local hostname in a header? I have two proxies, load balanced by LVS, so using server.ip reports the same IP on both nodes. Thanks, Sascha ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
Re: make varnish still respond if backend dead
Did you find a solution to this? On Fri, Apr 4, 2008 at 12:51 AM, Sascha Ottolski [EMAIL PROTECTED] wrote: Hi, sorry if this is FAQ: what can I do to make varnish respond to request if it's backend is dead. should return cache hits, of course, and a proxy error or something for a miss. and how can I prevent varnish to cache 404 for objects it couldn't fetch due to a dead backend? at least I think that is what happened, as varnish reported 404 for URLs that definetely exist; the dead backend seems to be the only logical explanation why varnish could think it's not. oh, and is there a way to put the local hostname in a header? I have two proxies, load balanced by LVS, so using server.ip reports the same IP on both nodes. Thanks, Sascha ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc
make varnish still respond if backend dead
Hi, sorry if this is FAQ: what can I do to make varnish respond to request if it's backend is dead. should return cache hits, of course, and a proxy error or something for a miss. and how can I prevent varnish to cache 404 for objects it couldn't fetch due to a dead backend? at least I think that is what happened, as varnish reported 404 for URLs that definetely exist; the dead backend seems to be the only logical explanation why varnish could think it's not. oh, and is there a way to put the local hostname in a header? I have two proxies, load balanced by LVS, so using server.ip reports the same IP on both nodes. Thanks, Sascha ___ varnish-misc mailing list varnish-misc@projects.linpro.no http://projects.linpro.no/mailman/listinfo/varnish-misc