Question on Re-Using Backend Probes

David Petzel davidpetzel at gmail.com
Wed Mar 16 19:21:21 CET 2011


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.

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?


probe myProbe1 {
         .url = "/";
         .interval = 5s;
         .timeout = 1 s;
         .window = 5;
         .threshold = 3;
}

backend server1 {
  .host = "server1.example.com";
  .probe = myProbe1
  }
backend server2 {
   .host = "server2.example.com";
  .probe = myProbe1
 }

All of the examples I've come across have the probe redefined again. for
example on
http://www.varnish-cache.org/docs/2.1/tutorial/advanced_backend_servers.html#health-checks
They show the following example which feels redundant.

backend server1 {
  .host = "server1.example.com";
  .probe = {
         .url = "/";
         .interval = 5s;
         .timeout = 1 s;
         .window = 5;
         .threshold = 3;
    }
  }
backend server2 {
   .host = "server2.example.com";
   .probe = {
         .url = "/";
         .interval = 5s;
         .timeout = 1 s;
         .window = 5;
         .threshold = 3;
   }
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20110316/6ef23014/attachment-0003.html>


More information about the varnish-misc mailing list