Mailing List Archive

[lvs-users] Highest weight only scheduling
Hi everybody,

I have a keepalived setup with three servers behind an ip. One is setup as a sorry server and only serves the maintenance pages, the other two are actual servers. We would like it setup so that traffic only routes to the one server until it goes down and then have the other server take the traffic, until the primary one comes back online.


Is there any way to do this?

Thanks,
~Rob
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] Highest weight only scheduling [ In reply to ]
On 23.01.2013, Rob Smith wrote:
> I have a keepalived setup with three servers behind an ip. One is setup as a sorry server and only serves the maintenance pages, the other two are actual servers. We would like it setup so that traffic only routes to the one server until it goes down and then have the other server take the traffic, until the primary one comes back online.
>
>
> Is there any way to do this?

None of the current IPVS schedulers do know "highest weight" balancing.

With the "weighted" schedulers, you can e.g. give your primary server
a weight of max. 65535 and your secondary server a weight of 1. This way,
you've "almost" reached the point you're asking for - however, one out
of 64k of incoming connections will go for the "secondary" server even
while the primary server is still up and running.

If your application is balancing-ready, this behaviour may be a good thing.
For example, by automatically using the secondary system for a few live
requests, you ensure your secondary system is actually working.
By sending some live traffic, you may also "warm up" application-specific
caches, so upon a "real" failover, the application will perform much better
than with empty caches.

If you really don't need (or your applications can't handle) the
"balancing" part (distribute traffic to different servers at the same time),
you'd probably better run "typical" high availability/failover software
like Pacemaker or some VRRP daemon.

For example, you might put all three boxes into the same VRPR instance
and assign them different VRRP priorities, and VRRP will sort out which box
has the "best" priority and is going to be the only live system. This results
in some kind of "cascading" failover.


If you need balancing to distribute traffic among different servers,
and you'd still like to have this "cascading" failover, you'll need to run
at least two balancer (pairs): one for the "primary" server farm, with the
VIP of the other balancer being set as sorry server. The second balancer
in turn balances to the "secondary" server farm and also has the maintenance
server set as a sorry server.

One usecase for such scenarios are web farms with slightly different content:
if the primary farm drops out of service (e.g. due to overload or some
bleeding-edge feature malfunctioning), the secondary farm may serve a less
feature-rich version of the same service.


Anders
--
1&1 Internet AG Expert Systems Architect (IT Operations)

Amtsgericht Montabaur HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich,
Robert Hoffmann, Andreas Hofmann, Markus Huhn, Hans-Henning Kettler,
Dr. Oliver Mauss, Jan Oetjen, Martin Witt, Christian Würst
Aufsichtsratsvorsitzender: Michael Scheeren

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users
Re: [lvs-users] Highest weight only scheduling [ In reply to ]
On Jan 24, 2013, at 3:50 AM, Anders Henke <anders.henke@1und1.de> wrote:

> None of the current IPVS schedulers do know "highest weight" balancing.

Hi Anders,

Thank you for the very informative and comprehensive reply.

We decided that using 65535/1 would work well enough for our use case.

Thanks again,
~Rob

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@LinuxVirtualServer.org
Send requests to lvs-users-request@LinuxVirtualServer.org
or go to http://lists.graemef.net/mailman/listinfo/lvs-users