Maintenance message

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Feb 10 11:00:22 CET 2010


In message <2CAA2D26-7B56-4402-88E1-559361135F33 at gmail.com>, Brad Schick writes
:
>I have a varnish server working well, but I'd like to have a standby
>server that does nothing but server up "Sorry we are preforming
>maintenance". My thought was to write VCL code to check the health
>of the director, and if that was bad use a different server (something
>like the example below). But that doesn't work. Any suggestions?

Actually, it just takes a bit of a detour:

	sub vcl_recv {
		set req.backend = cluster;
		if (!req.backend.healthy) {
			set req.backend = maint;
		}
	}

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list