handling failure in varnish
Nils Goroll
slink at schokola.de
Thu Jun 26 22:01:57 CEST 2014
On 26/06/14 12:17, Martin Blix Grydeland wrote:
> I believe a strict exit from the VCL method before the next statement on an
> error condition would be preferable to the no-ops.
my personal preference is to go even further than that.
We have got several use cases in production where we really cannot allow
ourselves to continue after WS exhaustion, so a relevant portion of our vcl
follow the pattern
set req.http.hdr = something;
if (! req.http.hdr) {
error 503 "bad thing happened here";
}
At this point I hardly see a justification any more to silently ignore set
operations, so I'd vote for an informative 503 (e.g. "workspace exhaustion at
VCL line xxx") with similar handling for VCL functions.
These errors should also be logged via stderr/syslog. The admin should have an
option to replace the 503 body with synth content suitable for the general
public - she could keep the original error for requests from dev/ops machines etc.
My impression is that the current behavior makes varnish behavior appear obscure
and hard to debug.
Nils
More information about the varnish-dev
mailing list