• Poul-Henning Kamp's avatar
    Add the first stab at a "restart" mechanism. · 1c8e6642
    Poul-Henning Kamp authored
    The intent is to be able to do things like:
    
    	backend b1 {
    		set backend.host = "fs.freebsd.dk";
    		set backend.port = "82";
    	}
    	backend b2 {
    		set backend.host = "fs.freebsd.dk";
    		set backend.port = "81";
    	}
    	backend b3 {
    		set backend.host = "fs.freebsd.dk";
    		set backend.port = "80";
    	}
    
    	sub vcl_recv {
    		remove req.http.cookie;
    		if (req.restarts == 0) {
    			set req.backend = b1;
    		} else if (req.restarts == 1) {
    			set req.backend = b2;
    		} else {
    			set req.backend = b3;
    		}
    	}
    
    	sub vcl_fetch {
    		if (obj.status != 200) {
    			restart;
    		}
    	}
    
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2067 d4fa192b-c00b-0410-8231-f00ffab90ce4
    1c8e6642
Name
Last commit
Last update
bin Loading commit data...
debian Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
man Loading commit data...
redhat Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
varnishapi.pc.in Loading commit data...