[ClusterLabs] Question about IPaddr2 & redis heartbeat, do they coordinate?

Strahil Nikolov hunter86_bg at yahoo.com
Fri Feb 14 00:17:50 EST 2020


On February 14, 2020 5:09:39 AM GMT+02:00, steven prothero <steven at marimo-tech.com> wrote:
>Greetings,
>
>Hello, I am new to pacemaker and learning much from the online
>documentation, searching on google, etc but have a specific question I
>am not sure about...
>
>My setup is two servers and the focus is redis.
>
>We use the heartbeat/IPaddr2 to update the VIP as needed, and the
>redis heartbeat to manage who is redis master...  Everything seems to
>work nicely.
>
>The boss requested I change the system to have Redis work first, if
>trouble switch & shutdown etc and then the VIP will switch after. How
>would one heartbeat wait for the other to finish? Is that a bad/good
>idea?
>
>As I am learning this all, from what I understand I think the two
>heartbeats are running in parallel and not coordinating together.
>Perhaps the VIP is switched quickly while the redis switch takes
>longer due to it negotiating a bit & dumping the database to disk and
>then shutting down..?
>
>I researched the "ordering" but I think that is more about what
>services load in first so doesn't help me with this situation.
>
>Appreciate very much any thoughts about this.
>
>Cheers
>
>Steve
>_______________________________________________
>Manage your subscription:
>https://lists.clusterlabs.org/mailman/listinfo/users
>
>ClusterLabs home: https://www.clusterlabs.org/

Hello Steven,


Actually I'm not sure that this is a good idea.
Usually a well-configured  daemon will bound to a specific IP (no matter  VIP or not)  and it is a best practice  to have the VIP 'power-up' before starting the application.

I have seen a configuration (examples on clusterlabs.org) where the VIP starts on all nodes before the application, but only 1  node will answer to requests (globally unique clones). In such case the failover  can be really fast.

You can check this one: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_clone_the_ip_address.html
I prefer to first test on a test cluster with a lot of arping, ping & tcpdump - to ensure that only 1 node answers (unless redis allows  full active - active).

Another option is to set the ip start after the redis master via an order constraint ( see  pcs constraint order --help).
I guess something like:
pcs  constraint order start  Master-REDIS then start Redis-IP kind=Mandatory
Or
pcs  constraint order  promote REDIS then start Redis-IP kind=mandatory


Best Regards,
Strahil Nikolov





More information about the Users mailing list