<div dir="ltr">I'm formally abandoning this thread and will only focus on the other one<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 18, 2021 at 8:21 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)">
I read you article and it was great but I didn't find out my answer, I said that I have 2 layer varnish: disk layer and ram layer and ram layer, I want to check the health of layer 2 for example:<br>
<br>
Varnish Ram ===> Varnish Disk ===> Webserver<br>
I adjust this probe on varnish ram:<br>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif">
<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif">
probe myprobe {
<div> .request =</div>
<div> "HEAD / HTTP/1.1"</div>
<div> "Connection: close"</div>
<div> "User-Agent: Varnish Health Probe";</div>
<div> .timeout = 1s;</div>
<div> .interval = 5s;</div>
<div> .window = 5;</div>
<div> .threshold = 3;</div>
<div>}</div>
<div>and varnish says: ` 0 Backend_health - boot.varnish_1 Still sick -------- 0 3 5 0.000000 0.000000 Open error 111 (Connection refused)`<br>
And I think it is right because it checks HEAD / on varnish backends and there is nothing there!<br>
So I'm asking how should I configure the probe to trigger another varnish health as a backend<br>
<br>
Best regards.</div>
</div>
<br>
</div>
<div id="gmail-m_-1742153457958270569appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-1742153457958270569divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Hamidreza Hosseini<br>
<b>Sent:</b> Thursday, February 18, 2021 5:31 AM<br>
<b>To:</b> <a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a> <<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">varnish-misc@varnish-cache.org</a>><br>
<b>Subject:</b> How to adjust priority for both backend healthy</font>
<div> </div>
</div>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I have two backend that both of them are healthy and I use fallback for them and I want to say all request should goes to backend1 and if backend1 become unhealthy all requests should go to backend2 but backend1 has higher priority and when backend1 become
healthy, all requests should go to backend1,<br>
How can I define priority?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
my config:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
```</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
vcl 4.1;
<div><br>
</div>
<div>import directors;</div>
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>probe myprobe {</div>
<div> .request =</div>
<div> "HEAD / HTTP/1.1"</div>
<div> "Connection: close"</div>
<div> "User-Agent: Varnish Health Probe";</div>
<div> .timeout = 1s;</div>
<div> .interval = 5s;</div>
<div> .window = 5;</div>
<div> .threshold = 3;</div>
<div>}</div>
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
backend backend1 { .host = "backend1"; .port = "8080"; .probe = myprobe; }
<div><br>
</div>
<div>backend backend2 { .host = "backend2"; .port = "8080"; .probe = myprobe; }</div>
<div>backend backend3 { .host = "backend3"; .port = "8080"; .probe = myprobe; }</div>
<br>
<div><br>
</div>
<div>sub vcl_init {</div>
<div><br>
</div>
<div> new backend2_cluster = directors.round_robin();</div>
<div> backend2_cluster.add_backend(backend2);</div>
<div> backend3_cluster.add_backend(backend3);</div>
<br>
<div><br>
</div>
<div> new backend_cluster_fb = directors.fallback();</div>
<div> backend1_fb.add_backend(backend1);</div>
<div> backend2_cluster_fb.add_backend(backend2_cluster.backend());</div>
<div>}</div>
<div><br>
</div>
<div>sub vcl_recv {</div>
<div> set req.backend_hint = backend_cluster_fb.backend();</div>
<div><br>
</div>
<div>}<br>
<br>
```<br>
</div>
<br>
</div>
</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>