Using Varnish to Proxy 1000s of different sites

Per Buer perbu at varnish-software.com
Thu Aug 5 16:50:10 CEST 2010


On Thu, Aug 5, 2010 at 4:33 PM, Tony Primerano <tony.primerano at gmail.com> wrote:
> (..)
> But what if I have 1000s of backends and I choose them based on the domain
> that user's hit varnish with.   Is this something Varnish handles or is it
> only intended to work with a handful of backends?

It's not built for that.  Kristians dns director might help you out a
bit, but it just entered trunk (will be in 2.1.4).

> Also, it would be really cool if I could do something like this..
> sub vcl_recv {
>   set req.http.host = "example.com";
>   set req.backend.host  = req.http.host;
>   return(pass);
> }

That would be an open proxy. Spammers bonanza. Please don't do that. :-)

If you still want to do it you could have a look at
http://ingvar.blog.linpro.no/2010/05/26/accelerating-the-internet-or-actually-squid-with-varnish/

and use a non-caching proxy in stead of squid. That would work.



-- 
Per Buer,  Varnish Software
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer




More information about the varnish-misc mailing list