[Pacemaker] designing a load balancer - request for comments

Florian Haas florian.haas at linbit.com
Fri Feb 11 14:18:46 EST 2011


On 02/11/2011 06:47 PM, Raoul Bhatia [IPAX] wrote:
>> Additionally I want the virtual-IP to be moved if upstream-connectivity
>> of a node is broken. Therefore I used ping as below:
>>
>> primitive extip ocf:heartbeat:IPaddr \
>>         params ip="11.222.32.161" \
>>         op monitor interval="3s"
>> primitive pingtest ocf:pacemaker:ping \
>>         params host_list="11.222.53.113" multiplier="10" dampen="5s" \
>>         op monitor interval="10s"
>> clone clonePing pingtest
>> location aktiverLB extip \
>>         rule $id="aktiverLB-rule" -inf: not_defined pingd or pingd lte 0
> 
> sorry, never successfully used ping so i cannot quote on its
> functionality. ;)

I have, and that config is fine.

>> So, now I am not sure anymore if I should use "location" or "colocation"
>> as constraint to have the virtual-IP only on a node which has
>> connectivity. I got the impression that colocation is for binary
>> decisions (Kamailio is either running or not) and location for resources
>> which may have non-binary score values (eg. ping score can be 0-x if I
>> ping x hosts).
> 
> location: add more/less weight for a host in regard to running a
> resource.
> think: "on which servers aka #uname am i allowed to run".
> 
> colocation: defines which resources shall/have to or should/must not
> run on the very same host.
> think: db must not run on the same host as webserver. extip webserver
> has to run on the same host as webserver.
> 
>> So, will it be correct to just add
>>
>> primitive pingtest ocf:pacemaker:ping \
>>         params host_list="11.222.53.113" multiplier="10" dampen="5s" \
>>         op monitor interval="10s"
>> clone clonePing pingtest
>> location aktiverLB extip \
>>         rule $id="aktiverLB-rule" -inf: not_defined pingd or pingd lte 0
>>
>> to your configuration or do I have to change this constraint to a
>> "colocation" constraint?
> 
> as said, i have never actually used the ping resource.
> 
> but i suggest you add a strong colocation rule between extip and
> kamailio (and quite possibly extip and ping or kamailio and ping),
> because it might happen that one node isn't able to start kamilio
> (e.g. config error during upgrade) so you do not want extip to
> "accidentally" run on this host.

The location constraint is fine for connectivity checks.

> so once more: read the documentation and some of the tutorials
> in the wiki and then try and play around to get a feeling for
> pacemaker.

And/or book a class with a high availability training provider.
Incidentally, one is available in Vienna next month. ;)

Cheers,
Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110211/e5180d87/attachment-0003.sig>


More information about the Pacemaker mailing list