Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.