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?