inconsistent output from debug.backend / debug.health

Nathan Mehl n+varnish at climate.com
Tue Apr 3 19:48:32 CEST 2012


Context: we have varnish fronting for a pool of servers that
(semi-)automatically scale based on load criteria. A puppet job updates a
vcl file defining all of the directors any time a server is added or
removed from the pool, and then reloads the VCL.

In general, this works quite well. The only problem is that as time goes on
and the pool grows and shrinks, the output from debug.health and
debug.backends becomes increasingly...odd.

Case in point:

directors.vcl:
director cms_director round-robin {
{ .backend = { .host = "10.62.87.78"; .port = "8080" ; .connect_timeout =
600s; .first_byte_timeout = 600s; .between_bytes_timeout = 600s; .probe = {
.url = "/healthy"; .interval = 5s; .timeout = 20s; .window = 5; .threshold
= 3; }} }
}

debug.backend:

0x7f83618dfc00 cms_director[0](10.251.39.31,(null),:8080) 3 0
0x7f51686f8840 cms_director[1](10.62.87.78,(null),:8080) 2 2
0x7f516848f480 cms_director[0](10.62.87.78,(null),:8080) 5 1

debug.health:

Backend cms_director[0] is Sick
Backend cms_director[1] is Healthy
Backend cms_director[0] is Healthy

Note that:

- there is a single cms backend defined in directors.vcl, but the debug
output lists three, two of which have the same IP address.

- backend cms_director[0] is listed twice (?!)

Reloading the vcl with vcl.load;vcl.use does not change matters, but fully
restarting the varnishd process will clear things up until after a while it
recurs.

This is particularly aggravating as I would like to use the backends/health
output in order to script rolling updates, but right now I cannot seem to
count on it reflecting reality.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-bugs/attachments/20120403/0d30196f/attachment.html>


More information about the varnish-bugs mailing list