<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 08/02/2012 01:55 PM, Oddur Snær Magnússon wrote:
<blockquote
cite="mid:E49910F11F025B4990FA56AD8158EB5706171B77@RKV-IT-EXCH103.ccp.ad.local"
type="cite">
<meta http-equiv="Context-Type"
content="text/html; charset=iso-8859-1">
<div>
<p><span>Seems like the fallback director is what I want, if I can
get it to try to continue trying on 404. </span></p>
<p><span>I could possibly map 404 to 503(temp unavailable) </span></p>
<p><a moz-do-not-send="true"
href="https://www.varnish-cache.org/docs/trunk/reference/vcl.html#the-fallback-director">https://www.varnish-cache.org/docs/trunk/reference/vcl.html#the-fallback-director</a><span>
</span></p>
</div>
</blockquote>
the fallback director means that your secondairy backends don't get any
requests, unless the first backend is unhealthy. I'm not sure if that's
what you want.<br>
<br>
I'm using the following setup to allow retries on different backends:<br>
<br>
director cluster1 random {<br>
{ .backend = backend1; .weight = 10; }<br>
{ .backend = backend2; .weight = 10; }<br>
...<br>
}<br>
<br>
sub vcl_recv {<br>
...<br>
set req.backend = cluster1;<br>
...<br>
}<br>
<br>
sub vcl_fetch {<br>
if (! beresp.cacheable) {<br>
if (beresp.status == 404 || beresp.status == 500 ||
beresp.status == 503) {<br>
if (req.restarts < 3) {<br>
return (restart);<br>
}<br>
}<br>
return (pass);<br>
}<br>
<br>
return (deliver);<br>
}<br>
<br>
Enno<br>
<br>
</body>
</html>