[ClusterLabs] Loadbalancing using Pacemaker
Ken Gaillot
kgaillot at redhat.com
Mon Nov 9 17:20:42 CET 2015
On 11/08/2015 11:29 AM, didier tanti wrote:
> Thank You Michael,
> In fact I spent some more time looking at documentions and indeed Pacemaker is only used for resource control and management. To have my HA solution I will need to use Corosync directly as well. The OpenAIS API is pretty well described and I am starting to understand what must be done (basically link my binaries with corosync and use the messages and other APIs to have a accurate states of remote objects/services).
> As for the Virtual IP I believe it makes more sense to use it in case of Active/Standby services. In my case B services being both active i would need to implement the load balancing within service A (using openAIS/Corosync API to be updated of service B state changes and how to reach the service B I have elected through round robin). For those specific components I don't foreseen the need of Virtual IP. However I may use VIP for my service A and other components!
Hi,
You may also want to look at Pacemaker's notification capability to call
an external script for node/resource changes. The latest upstream code
(which will be part of 1.1.14) has some new built-in notification
functionality, which is event-driven.
For prior versions, you can use the ClusterMon resource with -E in the
extra_options to achieve the same effect, but that is polling at regular
intervals rather than truly event-driven:
http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm231308442928
> Thanks,
>
>
> Le Dimanche 8 novembre 2015 16h24, Michael Schwartzkopff <ms at sys4.de> a écrit :
>
>
> Am Samstag, 7. November 2015, 09:40:47 schrieb didier tanti:
>> Hello, i am new to Pacemaker and have a question concerning how to have my
>> cluster services aware of the state and location of the other services in
>> the cluster. Example:
>> Service A is running on Host XService B1 is running on Host XService B2 is
>> running on Host Y Which API would allow my Service A to send IPC messages
>> to services B1 and B2 in a round robin manner?(for example how Service A
>> would be aware of which B is up and active (B1, B2 or both), and how A
>> would even be able to know on which host B1 or B2 is running?) It looks
>> very basic but i cannot find information on this on clusterlabs.org Is
>> there basic tutorial that would explain how to achieve this ? (I guess i
>> would need to link my service binaries with some pacemaker /corosync libs
>> and use some API ?) Thanks for helping out,
>
> Hi,
>
> this task is beyond the ability of pacemaker. Your application has to know how
> to handle that.
>
> Best solution would be to use virtual IP addresses for services B1 and B2.
> make sure that the IP addresses run together with the services. Now you
> service A only has to talk to the IP addresses, no matter on which host they
> run.
>
> pacemaker could take care that they run on different hosts is possible.
>
> Mit freundlichen Grüßen,
>
> Michael Schwartzkopff
More information about the Users
mailing list