ldirectord is an application that controls some things and monitors others. It does several jobs.
- It creates an IPVS load balancer.
- It checks my real servers to make sure they are OK.
- It fiddles with the IPVS load balancer to ignore servers that are not OK.
It does all this clever stuff after I give it the right configuration file.
ldirectord is started and stopped by the heartbeat application. Heartbeat checks computers to make sure they are OK. If the computer doing all the ldirectord work dies, heartbeat starts ldirectord on another one.
ldirectord is a daemon to monitor and administer real servers in a LVS cluster of load balanced virtual servers. ldirectord typically used as a resource for Linux-HA , but can also be run from the command line.
A LVS cluster consists or one or more virtual services each of which may have zero or more real servers. The IP address of a virtual service is what end-users connect to and is typically advertised over DNS. When a connection is made to a virtual service, it is allocated a real server, and all packets for this connection are forwarded to this real server. A more detailed overview of LVS can be found here.
ldirectord has a configuration file which specifies the virtual services and their associated real servers. When ldirectord is initialised it creates the virtual services for the clutster.
ldirectord monitors the health of the real servers by periodically requesting a known URL and checking that the response contains an expected response. If a real server fails then the server is removed and will be reactivated once it comes back on line. If all the real servers are down then a fall-back server is inserted into the pool, which will made quiescent one of the real web servers comes back on line. Typically, the fall-back server is localhost. If an HTTP virtual service is being provided then it is useful to run an Apache HTTP server that returns a page indicating that the service is temporarily inaccessible.
The latest and greatest version is always available via Mecurial. Snapshots are also provided as a convinience. For more information on both the mecurial repository and snapshots, please see the download page.