In message <1251797169.13050.48.ca...@pioneer>, Gerald Leier writes:
>hello again,
>
>Is or isnt it possible to make varnish ask another backend
>if the first returns a HTTP 500 or any other user defined
>HTTP code when forwarding a users request?
>
>and if its possible -> whats the varnish way to do that?

Use the "restart" facility, which basically tried the request
once more from the beginning, with any possible modifications
you have made or will make.

Typically, you would set another backend in vcl_recv{},
something like:

        ...
        if (req.restarts > 0) {
                set req.backend = better_one;
        } else {
                set req.backend = normal_one
        }


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
varnish-misc mailing list
[email protected]
http://projects.linpro.no/mailman/listinfo/varnish-misc

Reply via email to