Take the 2-minute tour ×

I managed to set up a pacemaker-heartbeat cluster with a virtual IP address and a virtual instance of ldirectord, by gathering information from here, here and here. It seems that the proper way to use ldirectord is to have two load-balancing servers in front of two apache servers, then doing some arp tricks to get the apache servers to respond to the virtual IP.

According to this blog post (starting from "the traditional way"), these arp tricks will not work on a two-server setup, and may cause infinite loops. He then suggests some solution which I didn't fully understand, but is keepalived-specific.

So my question is: is it possible to use a clustered ldirectord to load balance between apache instances on the very same two servers? Like this picture?

share|improve this question

1 Answer 1

Keepalived is a different project than heartbeat.

I usually use heartbeat for high availability. For heartbeat, you can define the resources that will be owned by one machine at a time. The VIP is one of these resources that can "move" from one machine to another. AFAIK, heartbeat package does not provide load balancing. To implement load balancing, I can use another package like haproxy.

Yes, it is possible to use the very same two servers to act as a load balancer and web server.

share|improve this answer
Thanks, I guess. My question was about ldirectord, but I'm also looking into haproxy as an alternative solution. It seems to be easier with haproxy, working on level 7 rather than 4, since no arp tricks are needed. –  itsadok Nov 25 '10 at 8:25

Your Answer


