<div dir="ltr">Hi,<div><br></div><div>You want to use probes and the fallback director.</div><div><br></div><div>Relevant documentation:</div><div>to define a probe:<a href="https://varnish-cache.org/docs/6.4/reference/vcl.html?highlight=probe#probes">https://varnish-cache.org/docs/6.4/reference/vcl.html?highlight=probe#probes</a></div><div>to attach it to backends: <a href="https://varnish-cache.org/docs/6.4/reference/vcl.html?highlight=probe#backend-definition">https://varnish-cache.org/docs/6.4/reference/vcl.html?highlight=probe#backend-definition</a></div><div>the fallback director: <a href="https://varnish-cache.org/docs/6.4/reference/vmod_directors.html?highlight=fallback#directors-fallback">https://varnish-cache.org/docs/6.4/reference/vmod_directors.html?highlight=fallback#directors-fallback</a></div><div><br></div><div>i also wrote these blog posts a long time ago, but they are still valid:</div><div><a href="https://info.varnish-software.com/blog/backends-load-balancing">https://info.varnish-software.com/blog/backends-load-balancing</a><br></div><div><a href="https://info.varnish-software.com/blog/backends-load-balancing-part-2">https://info.varnish-software.com/blog/backends-load-balancing-part-2</a><br></div><div><br></div><div>The first one goes through probes, and the second one explores directors, including the fallback one.</div><div><br></div><div>Hope that helps</div><div><br></div><div>-- <div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Guillaume Quintard<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 4, 2020 at 7:14 AM hamidreza hosseini <<a href="mailto:hrhosseini@hotmail.com">hrhosseini@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I want to have 2 or 3 backends in the Varnish config file but just one of them workes as an active backend and whenever my active backend failed , the second backend become active and respond the requests. (In other hand, I dont want to have two backend for
 responding clients and just one of them works at the same time, and it check the health status of my active backend , whenever it is was unhealthy , varnish switch to the second or third backend.)<br>
Best Regards.<br>
</div>
</div>

_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div>