I'm really new to varnish, so please forgive me if this answered elsewhere, I did some searching and couldn't seem to find it however.<div><br></div><div>I was reviewing the documention and I have a question about back end probes. I'm setting up a directory that will have 10-12 backends. I want each backend to use the same health check, but I don't want to have to re-define the prove 10-12 times. Is it possible to define the probe externally to the backend configuration, and then reference it. Something like the following?</div>
<div><br></div><div><br></div><div><div>probe myProbe1 {</div><div><div> .url = "/";</div><div> .interval = 5s;</div><div> .timeout = 1 s;</div><div> .window = 5;</div><div> .threshold = 3;</div>
</div><div>}</div><div><br></div><div>backend server1 {</div><div> .host = "<a href="http://server1.example.com">server1.example.com</a>";</div><div> .probe = myProbe1</div><div> }</div><div>backend server2 {</div>
<div> .host = "<a href="http://server2.example.com">server2.example.com</a>";</div><div> .probe = myProbe1</div><div> }</div></div><div><br></div><div>All of the examples I've come across have the probe redefined again. for example on <a href="http://www.varnish-cache.org/docs/2.1/tutorial/advanced_backend_servers.html#health-checks">http://www.varnish-cache.org/docs/2.1/tutorial/advanced_backend_servers.html#health-checks</a></div>
<div>They show the following example which feels redundant.</div><div><pre>backend server1 {
.host = "<a href="http://server1.example.com">server1.example.com</a>";
.probe = {
.url = "/";
.interval = 5s;
.timeout = 1 s;
.window = 5;
.threshold = 3;
}
}
backend server2 {
.host = "<a href="http://server2.example.com">server2.example.com</a>";
.probe = {
.url = "/";
.interval = 5s;
.timeout = 1 s;
.window = 5;
.threshold = 3;
}
}</pre></div>