Configuring a fallback server for a director
Andreas Jung
lists at zopyx.com
Wed Jun 16 18:23:51 CEST 2010
Excellent hint - works perfectly!
Andreas
2010/6/16 Marc Fournier <marc.fournier at camptocamp.com>
> Hello,
>
> > Is it possible to configure a fallback server (serving a static
> > maintenance page) for a director with some backend
> > servers in case all backend servers are down?
>
> I had the same need some time ago, and solved it by simply switching
> backends when the main ones are in an "unhealthy" state:
>
> director cluster round-robin {
> { .backend = {
> ...
> .probe = { # required to let req.backend.healthy work
> ...
> }
> }
> }
> ...
> }
>
> backend sorryserver {
> ...
> }
>
> sub vcl_recv {
>
> set req.backend = cluster;
>
> if (!req.backend.healthy) {
> set req.backend = sorryserver;
> pass;
> }
> }
>
> I hope this helps !
> Marc
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20100616/7d5ecf7d/attachment-0002.html>
More information about the varnish-misc
mailing list