On Tue, Jul 9, 2019 at 8:12 AM Nikolay Bogdanov
<[email protected]> wrote:
>
> Hello. I have one case and I can not find good solution for it.
> In varnish3 req.backend was saved during restarts, so I can compare old 
> backend property and set other backend after first restart.
> But in varnish 5 and newer req.backend_hint in vcl_recv is default always. I 
> can not use retry in vcl_backend_response, because this function did not 
> called.
> How can I fix it?

What you are looking for is probably a circuit breaker, you can
implement one with vmod-saintmod:

https://github.com/varnish/varnish-modules/blob/master/docs/vmod_saintmode.rst#vmod_saintmode

However instead of using it with req, it's probably more efficient to
work on the backend side and retry from vcl_backend_fetch or
vcl_backend_error.

Best,
Dridi
_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to