Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible in Varnish 3 to configure a backend to have multiple probes?

I have multiple varnish servers and multiple backend servers running Drupal. I've configured a basic 1 second interval healthcheck PHP file to verify the health of the application server, but I would also like to use a healthcheck for the Drupal stack, however this check would need to run less often than the basic healthcheck. e.g.: Every 5 seconds it could check the Drupal stack.

Is it possible to use 2 separate probes on a single backend for such a case?

Theoretical configuration:

probe healthcheck {
    .url = "/healthcheck.php";
    .interval = 1s;
    .timeout = 100 ms;
    .window = 5;
    .threshold = 5;
}

probe drupalcheck {
    .url = "/index.php";
    .interval = 5s;
    .timeout = 5s;
    .window = 5;
    .threshold = 5;
}

backend apache_1 {.host = "server01"; .port = "8080"; .probe = healthcheck; .probe = drupalcheck}
backend apache_2 {.host = "server02"; .port = "8080"; .probe = healthcheck; .probe = drupalcheck}
backend apache_3 {.host = "server03"; .port = "8080"; .probe = healthcheck; .probe = drupalcheck}
share|improve this question
add comment

1 Answer

Quick answer: no.

Longer answer: You can specify as many backends to a single actual backend server, and each can have it's own probe. You can then route traffic to them as you want.

You could also call something like a 'probe-check' script on your application server via the probe call, which could do it's own status checks. You're just calling a php/python/etc script anyway, so it can be a script you created.

There's more (not totally relevant) here: https://www.varnish-cache.org/lists/pipermail/varnish-misc/2011-October/021298.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.