Trying to use X-Backend to select backend

Bernardf FRIT bernard at
Fri Oct 30 18:23:31 CET 2009

Tollef Fog Heen :

Thanks for your answer
> | I downgraded varnish to v 2.0.3 in order to use the
> | varnish-bereq-hosts.patch
> Which patch is this?

> |   1. Store the backend name into X-Backend custom header
> |   2. Force each request with  a X-Backend header to be directed to the
> |      stored backend name
> There is currently no way to look up backends by name, so you would have
> to write this as a series of if statements
Yes it worked but didn't do the job I expected. After first request to 
the site I want the browser to
be always directed to the same backend (due to sessionId management). I 
think I have to use Cookies
to achieve this or just serve static content with varnish and use 
haproxy as backend for dynamic content.

I'm just wondering which solution is best :
- varnish as frontend to haproxy
- haproxy as frontend to varnish

Bernard FRIT

More information about the varnish-misc mailing list