varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

Saintmode for Varnish 5.0 requires probe for blacklisting backend #51

Closed heyitsroberthe closed 7 years ago

heyitsroberthe commented 7 years ago

From reading the documentation, I was under the impression that saintmode would automatically blacklist the backend when reaching the threshold as defined here:

new sm1 = saintmode.saintmode(default1, 3);

However, I noticed that the behavior doesn't occur when I check in varnishadm and disable one backend. I have to rely on the probe to get the desired behavior. Is this correct?

dridi commented 7 years ago

Hello, I'm not aware of any such changes, can you please write a test case that differs in behavior between Varnish 4.1 and 5.0?

@daghf any idea?

heyitsroberthe commented 7 years ago

You can have two apache servers running on separate machines serving identical content. On the primary machine, with varnish configured and running, kill the server. Varnish should detect that after getting several 503's from primary server, it would mark server #1 as unhealthy and redirect all requests to the second. I wouldn't see any further 503's. Disabling grace mode makes the problem more visible.

dridi commented 7 years ago

That's a bit too heavyweight, we tend to use only varnish tooling for testing (mainly varnishtest). Can you please show just enough VCL to reproduce the problem? I will try to write a test case.

gquintard commented 7 years ago

Not sure I get the original ticket. First, saintmode requires no probe, second, what behavior isn't triggered went what backend is forcefully set to sick?

Can you have a look at the tests and tell us what you are doing they are not, or better, provide us with a vtc triggering the issue?

If all else fail, please show us a minimal (and anonymized) vcl exhibiting the issue.

dridi commented 7 years ago

ETIMEDOUT