Mailing List Archive

Varnish the poor mans reverse proxy?
Is it possible to use varnish as a fake layer 7 load balancer by redirecting
static content (e.g. .png, .jpg, etc) to a fast static server and dynamic to
another?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.linpro.no/pipermail/varnish-misc/attachments/20070604/b3030257/attachment.htm
Varnish the poor mans reverse proxy? [ In reply to ]
Nathan McSween <nwmcsween at gmail.com> writes:
> Is it possible to use varnish as a fake layer 7 load balancer by redirecting
> static content (e.g. .png, .jpg, etc) to a fast static server and dynamic to
> another?

Yes.

I hope you meant to write "the poor man's load balancer", because
there's nothing second-rate about Varnish's abilities as a reverse
proxy...

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Varnish the poor mans reverse proxy? [ In reply to ]
In message <000301c7a709$fbaafda0$6600a8c0 at octane>, Nathan McSween writes:

>Is it possible to use varnish as a fake layer 7 load balancer by redirecting
>static content (e.g. .png, .jpg, etc) to a fast static server and dynamic to
>another?

Yes.

Declare two backends in your VCL program and select the appropriate
one in vcl_miss{}

--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.