infrastructure setup using ESI

Per Buer perbu at
Fri Oct 22 09:48:56 CEST 2010


On Thu, Oct 21, 2010 at 11:14 PM, Gresens, August
<AGresens at>wrote:

> Where does Varnish typically reside in the network architecture? I would
> imagine in a scenario in which we would be using ESI, we would want Varnish
> in front of the application load balancers. In this way, Varnish would be
> the primary page assembler. We would likely run an HA setup for fault
> tolerance.

Since I am such an expert in picking out color for such bikesheds I thought
I might chime in. :-)

It actually makes quite a lot of sense to have Varnish do the actual
application load balancing. That way you can leverage the saint mode
properly giving you far better fault tolerance. Imagine one app server
failing; Varnish can then try the other one, if that one fails as well serve
up some stale content from cache.

>  We were also considering if Varnish could be used much farther downstream
> – in between the load balancer and the application. We thought is might
> provide for more fault tolerance, but it seems the disadvantage would be
> that there would be a separate cached copy in each redundant varnish
> instance, and with ESI secondary requests would be made back out to the same
> web server potentially, setting up a feed back loop that could cause
> problems.

As has already been suggested - place a load balancer in front of Varnish
and make it hash on target URL. Oh, did I mention that it makes sense to use
Varnish as a hashing load balancer also? Just turn off the caching. There
are some features that Varnish might lack compared to other load balancers
(gzip, ssl) but it more then makes that up with speed and flexibility.

Per Buer,  Varnish Software
Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / skype: per.buer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list