Dual load balancer (one failsafe)?

Alexander Staubo alex at bengler.no
Sun Jun 15 07:55:31 MSD 2008


On Sun, Jun 15, 2008 at 5:24 AM, Floren Munteanu <nginx at yqed.com> wrote:
> More thoughts on that, related to Heartbeat usage:
> http://affectioncode.wordpress.com/2008/06/11/comparing-nginx-and-haproxy-for-web-applications/
[...]
>
> So I think a more suitable software would be HaProxy, instead of Heartbeat.
> I plan to serve PHP mixed with static files, on all nodes.

HAProxy does not replace Heartbeat. They complement each other,
certainly, but if you have a single HAProxy then that's a single point
of failure.

It would be useful if you could clarify what you are looking for,
since you seem to be missing the point, even after I gave you detailed
explanation of the nature of single points of failure.

I assumed -- perhaps erroneously -- you were looking for a way to
prevent your site from going down if one of your three boxes went
down. Also, since you mentioned load balancing, I assumed you wanted
an automatic prevention mechanism, as opposed to one that had to be
executed manually.

Just to reiterate, then: If you have two boxes and one of the boxes
dies, ipso facto the dead box cannot do anything about the situation.
It's *dead*. If it's your main web server (and/or load balancer),
you're screwed. It can't even tell anyone that it's dead. The solution
to this problem is redundancy: delegating the task of failure
detection and failure management to several boxes that are each
capable of taking control. Heartbeat does that.

As for HAProxy vs. Nginx, they are equally good at most types of
loads. If you read my article closely you will notice that it
describes a particular scenario where Nginx's load-balancing algorithm
is not well-suited. For most PHP apps it should be just dandy.

Alexander.





More information about the nginx mailing list