<p>I'm succesfully using lvs in director mode to load balance and provide ha for multiple varnish caches. It works really well.</p>
<div class="gmail_quote">On Dec 7, 2011 5:36 a.m., "Allan Wind" <<a href="mailto:allan_wind@lifeintegrity.com">allan_wind@lifeintegrity.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 2011-12-07 00:05:24, Alejandro wrote:<br>
> Hi guys,<br>
><br>
> I need your advice... I'm using varnish into multiple server, some for<br>
> caching dynamic content and other only for static content.<br>
><br>
> On front of the Dynamic Content Varnish y have Cisco ACE Load balancer, but<br>
> on front of the Static Varnish, the traffic is much higher and can't use<br>
> Cisco ACE, for this reason I'm using RoundRobin DNS into this 2 servers.<br>
><br>
> This week I had, some network issue with one of this servers and when the<br>
> network go down I loose 50% of the traffic...<br>
><br>
> here my question, or advice request... How I can have HA with 2 varnish<br>
> server? I'm thinking on Heartbeat or Heartbeat+ldirectord, please fell free<br>
> to send your suggestions.<br>
<br>
As your clients do not fall back to the 2nd IP it means you need<br>
one (active/passive) or two vips (active/active) that can be<br>
shared between your two varnish servers.<br>
<br>
If you have cachable dynamic content then your two Varnish<br>
instances may return different content to the same client.  This<br>
may or may not be an issue.  Others will have to weight in if<br>
cache invalidation of Varnish entries is a doable strategy<br>
(if you cannot set your expiration headers correctly).  On the<br>
positive side you have a warm cache should one of your Varnish<br>
instances fail.  With a active/passive fail over the cold cache<br>
may be problematic.<br>
<br>
That said I am surprised that you think Varnish will be able to<br>
handle your traffic but a pair of load balancers cannot.  If the<br>
Cisco ACE is not up to it have you looked at haproxy?  You still<br>
have the same vip issues, but load balancers are stateless and<br>
give you persistence connections to minimize differences between<br>
Varnish instances.<br>
<br>
<br>
/Allan<br>
--<br>
Allan Wind<br>
Life Integrity, LLC<br>
<<a href="http://lifeintegrity.com" target="_blank">http://lifeintegrity.com</a>><br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div>