[Pacemaker] designing a load balancer - request for comments
Raoul Bhatia [IPAX]
r.bhatia at ipax.at
Fri Feb 11 15:13:16 UTC 2011
hi,
On 02/11/2011 03:07 PM, Klaus Darilion wrote:
...
> If everything is fine, then Kamailio should run on both servers.
>
> But for example how should the cluster behave if e.g. Kamailio crashes
> and restarting by pacemaker again leads to crashes (e.g. Kamailio has DB
> connectivity problems or other problems).
in this case, there should be no need for a multistate resource.
cloning the kamailio service should be fine.
> Is there some protection in pacemaker to not endlessly trying to restart
> such a broken service?
>
> Or, how should pacemaker behave if Kamailio on the active node crashes.
> Shall it just restart Kamailio or shall it migrate the IP address to the
> other node and then try to restart Kamailio on the inactive node?
pacemaker will not endlessly try to restart the configured resources:
http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/s-failure-migration.html
pacemaker can be configured to restart a resource e.g. for a couple of
times and if this does not work, it will migrate to another host.
(you can also configure pacemaker to migrate upon the first failure)
please read the documentation (link above)
if the clone'd resource properly synchronizes by itself, you only need
to migrate the (public) service ip address. a colocation rule will
achieve that.
basic clone setup:
primitive extip ocf:heartbeat:IPaddr2 \
params ip="a.b.c.d" nic="eth0.123" cidr_netmask="28" \
op monitor interval="30"
primitive kamailio ocf:pernau:kamailio \
op monitor interval="30" timeout="30" \
op monitor interval="15" role="Slave" timeout="30" \
op monitor interval="10" role="Master" timeout="30"
clone clone-kamailio kamailio
colocation colo_extip_with_kamailio inf: extip ms-kamailio
cheers,
raoul
ps. in the last ms configuration, i accidentally wrote wdb-mysql
instead of kamailio - i simply copied a running m/s config and adapted
it for your needs ;)
--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. r.bhatia at ipax.at
Technischer Leiter
IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. office at ipax.at
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________
More information about the Pacemaker
mailing list