title: Why my varnish health check always return the backend server is sick?
body: <p>I used varnish as cache server before my nginx web server. I configured the health check for the definition of backend server in varnish configuration file. But the varnish always return my backend server is sick, while I stopped my varnish and directly connected nginx server, it can works well. I try to use .url or .request to enable backend server check, it never work well. Its crarzy how to resovle it. </p>
  
  <p>My configuration is :</p>
  
  <pre><code>probe backend_healthcheck {   
  .url = "/";
  .window = 5;
  .threshold = 3;
  .interval = 300s;
  }
  
  backend nginx2 {
  .host = "10.161.78.249";
  .port = "80";
  .probe = backend_healthcheck;
  }
  
  backend nginx2 {
  .host = "10.161.78.249";
  .port = "80";
  .probe = backend_healthcheck;
  }
  
  import directors;
  import std;
  sub vcl_init {
  new webserver = directors.hash();
  webserver.add_backend(nginx1,1.0);
  webserver.add_backend(nginx2,1.0);
  }
  
  sub vcl_recv {
  set req.backend_hint = webserver.backend(req.http.cookie);
  }
  </code></pre>
  
  <p>I really don't know which configuration is error? The varnish is running on the server has public ip and the backend server only has internal ip.</p>
  
  <p>Hope some help me, Thanks a lot. </p>