Trying to use X-Backend to select backend

Tollef Fog Heen tfheen at redpill-linpro.com
Mon Nov 2 09:18:18 CET 2009


]] Bernardf FRIT

Hi,

| > | I downgraded varnish to v 2.0.3 in order to use the
| > | varnish-bereq-hosts.patch
| >
| > Which patch is this?
|
| http://varnish.projects.linpro.no/attachment/ticket/481/

I doubt we'll want to merge this, as it's unneeded in trunk.

| > |   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

Either should work fine, but test.  You could just also move all static
content to a different host name and let haproxy be the dynamic one and
varnish the static one.

-- 
Tollef Fog Heen 
Redpill Linpro -- Changing the game!
t: +47 21 54 41 73



More information about the varnish-misc mailing list