Re: varnish-misc Digest, Vol 28, Issue 15

2008-07-21 Thread Anders Vännman
Hej,

Jag har semester till och med den 24 augusti. Maila till [EMAIL PROTECTED]
eller ring  090-15 10 20  om det gäller brådskande supportärende.

Mvh Anders V

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Cookies, User-agents and Hashes

2008-07-21 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Audun Ytterdal writes:
Lets say you have this site that when browsing with for example an
iphone you are sendt to another backend with scaled down content for
your eyes only. You users like this light version of you site, but some
still wants to see the full version with all bells and whistles

What I've done so far:

in vcl_recv {

if (req.url == /  req.http.User-Agent ~ ^Mozilla/5.0
\(iP(hone|od);   !req.http.User-Agent ~ somecookie ) {
set req.backend = someother;
pass;
}

It's set to pass because otherwise it will on a hit lookup the same hash
as the non-iphone users and visa-versa

I could add User-Agent to my hash, but that is a bit overkill and would
make my cache 10-30 times larger. A substring might help a bit here.

How about this:

sub vcl_recv {
unset req.http.hash_input;  // Don't confuse me
if (req.url == / 
req.http.User-Agent ~ ^Mozilla/5.0 \(iP(hone|od); 
!req.http.User-Agent ~ somecookie ) {
set req.backend = someother;
set req.http.hash_input = iphone;
}
}

sub vcl_hash {
set req.hash += req.http.hash_input;
}

-- 
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
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Backend failover

2008-07-21 Thread Poul-Henning Kamp
In message [EMAIL PROTECTED], Kamil
 Radziszewski writes:

Can I configure varnish backend so that it has few servers in failover mode?

We have a hackish way to do it now with what we call restarts,
more comprehensive solutions is in the pipeline.


-- 
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
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc