You are mixing two totally different things together.

1) HAProxy will do periodic health checks of backend systems you are routing to. Depending if you configure something as 'backup' or 'not backup' will determine if/how traffic is routed to it. The backend systems do not 'take over'. Haproxy just routes traffic to systems based on your configuration. The backend systems don't know/care about the other backend nodes, unless your application requires it which is a different story and nothing to do with haproxy. HAproxy only cares about a single instance of itself - If you have more than one haproxy instance, they do NOT communicate anything between each other.

2) In terms of keepalived, pacemaker, etc, it makes no difference which you use with haproxy - all they do is manage the IP address(es) which haproxy is listening on, and perhaps restart haproxy if it dies. Their configuration and how you maintain quorum in a two-node configuration is a question for one of their mailing lists, or just read their documentation. I personally use pacemaker.

On 11/29/12 1:35 PM, Hermes Flying wrote:
Well I don't follow:
"You can have a pool of primary that it routes across, then backup systems that are only used when all primary systems are unavailable." When you are saying that "the backup systems that are used when primary systems are unavailable", how do they decide to take over? How do they know that the other systems are unavailable? Are you saying that they depend on third party components like the ones you mentioned (Keepalived etc)? In this case, what is the most suitable tool to be used along with HAProxy? Is there a reference manual for this somewhere?

*From:* David Coulson <da...@davidcoulson.net>
*To:* Hermes Flying <flyingher...@yahoo.com>
*Cc:* Baptiste <bed...@gmail.com>; "haproxy@formilux.org" <haproxy@formilux.org>
*Sent:* Thursday, November 29, 2012 8:21 PM
*Subject:* Re: HAproxy and detect split-brain (network failures)

HAProxy only does primary and backup in terms of active backend systems - You can have a pool of primary that it routes across, then backup systems that are only used when all primary systems are unavailable.

There is no concept of a cluster in terms of haproxy instances, although you can run more than one and manage them via something like pacemaker, keepalived or rgmanager.

On 11/29/12 1:19 PM, Hermes Flying wrote:
Hi,
From a quick look into HAProxy, I see that it is a Primary/backup architecture. So isn't ensuring that both "nodes" don't become primary part of HAProxy's primary/backup "protocol" ?

*From:* Baptiste mailto:bed...@gmail.com
*To:* Hermes Flying mailto:flyingher...@yahoo.com
*Cc:* mailto:haproxy@formilux.org mailto:haproxy@formilux.org
*Sent:* Thursday, November 29, 2012 3:02 PM
*Subject:* Re: HAproxy and detect split-brain (network failures)

Hi,

This is not HAProxy's role, this is the tool you use to ensure high
availability to do that.

I could see a way where HAProxy can report one interface failing,
maybe this could help you to detect if you're in a split brain
situation.

cheers



On Thu, Nov 29, 2012 at 11:51 AM, Hermes Flying <flyingher...@yahoo.com <mailto:flyingher...@yahoo.com>> wrote:
> Hi,
> I am looking into using HAProxy as our load balancer.
> I see that you are using a primary/backup approach. I was wondering how does > HAProxy (if it does) address split-brain situation? Do you have a mechanism
> to detect and avoid it? Do you have some standard recommendation to all
> those using your solution?
>
> Thanks






Reply via email to