best node placement for varnish accelaration
Tim Dunphy
bluethundr at gmail.com
Tue Apr 15 16:01:10 CEST 2014
Hi Emilio,
you have at least two way:
> - active-active with the F5 balancing the varnish node (then the varnish
> will balance the 4 web server directly as backends without the F5)
> - active-standby without the F5 and with keepalived on the two varnish
> node (I have some deployments like this where I also put the two varnish
> node, with keepalived for the HA, outside the firewall (the firewall may be
> one of the bottleneck on hi traffic sites)
Thank you, this is great clarification. So it looks like whichever way we
go we still need to assign the VIP (10.10.40.42) to the two Varnish nodes,
not the web servers! And in any case have Varnish load balance the web
servers. Whether we want to setup active/standby with keepalived or
active/active with the F5 is something I'll have to talk over with the
team.
However in the config I've inherited from the other datacenter as I
demonstrated the first IP in that config is the VIP. So even tho that's
what gave me the idea that the load balancer needs to be looking at the
Varnish nodes and not the web servers. But what you're saying is that
whether we go active / active we shouldn't define the VIP IP anywhere in
the VCL??
That's really the only question I still have. Otherwise I think I have a
clear idea of how we should go about this.
Thanks!
Tim
On Mon, Apr 14, 2014 at 4:09 PM, emilio brambilla <emilio at antispam.it>wrote:
> hello,
>
>
> On 2014/04/14 03:21, Tim Dunphy wrote:
>
>>
>> Thanks for your input. That was exactly what needed to confirm what I
>> was thinking we'd ought to do. I'm going to go ahead and recommend that we
>> take the web servers out of the vip pool and instead point the vip at the
>> two varnish cache nodes. I'm thinking we'll need a heartbeat established
>> between the two (something like keepalived) to enable the failover so that
>> each node can assume the identity of the VIP ip.
>>
>> you have at least two way:
> - active-active with the F5 balancing the varnish node (then the varnish
> will balance the 4 web server directly as backends without the F5)
> - active-standby without the F5 and with keepalived on the two varnish
> node (I have some deployments like this where I also put the two varnish
> node, with keepalived for the HA, outside the firewall (the firewall may be
> one of the bottleneck on hi traffic sites)
>
> of course the active-standby version with keepalived will NOT use the F5
> balancer neither in the frontend nor in the backend.
>
>
>> All I am really still curious about at this point is whether I should
>> post this section on my first node:
>>
>> if (req.restarts == 0) {
>> if (client.ip == "10.10.40.8" || client.ip == "10.10.40.9") {
>> set req.backend = www;
>> } elsif (server.ip == "10.10.40.8") {
>> set req.backend = varnish2;
>> } else {
>> set req.backend = varnish1;
>> }
>> } elsif (req.restarts >= 2) {
>> return (pass);
>>
> I really cannot undestand this... you will have the same vcl on both the
> varnish nodes, and you will have 4 backend (the 4 web server) on them the
> F5 vip and the cache ip shoud NOT be backend on your vcl
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
--
GPG me!!
gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140415/0ce65621/attachment.html>
More information about the varnish-misc
mailing list