On Wed, Dec 19, 2007 at 12:28:30PM -0600, Aaron Linnen wrote:
> Jean-Paul BALOCHE [STG] wrote:
> > Hi,
> > I'm a new user of ldirectord. I've got a running configuration with 20
> > http servers.
> > I've got a question regarding the way ldirector check the availibilty of
> > http servers.
> > On each http server, I've got 10 virtual hosts each one on a specific
> > port. ldirector is configured to check every virtual host of every
> > servers. It do it sequentialy, so if several virtual hosts are done, I
> > have to wait for the timeout to arrive. So it take a long time to check
> > all servers. Is it possible to parallelise checks ?
> > Thanks for your answer ;-)
> > JPB
> You can look in the list archives for the thread titled RFC: Forking
> ldirecterd [PATCH] by Ryan Castellucci which starts with:
> The attached patch modifies ldirectord to fork a process for each
> virtual server to speed up response time with large numbers of virtual
> servers. I am testing this vs multiple instances of ldirectord, two
> virtual servers, three real servers each, and it uses about 25MB less
> ram over that, and starts up a lot quicker.
> Looks like what you want. That patch should be included in the next
> ldirectord release.
Its possible to parallelise the checks at the real-server level and
at the virtual-service level. Currently ldirectord only supports the
latter in two different ways, "execute" and "fork".
"execute" is an older way of having ldirectord run multiple processes.
By adding one or more execute directives to an ldirectord.cf file
it will spawn a copy of ldirectord with the specified sub-configuration
file. By splitting virtual services up between configuration files,
some degree of parallelism can be achieved.
"fork" is a new method, which when activated in the configuration
file causes ldirectord to spawn a child process for each virtual
service. Again, this gives elms parallelism in the checks. This
was added to the repository quite recently, and as Aaron mentions,
should appear in the next release.
Neither of these methods address parallisation at the real-server level.
Forking is probably a bit heavy for this. But on the other hand,
many of the protocol checks included in ldirectord can't readily
be ported to a select()/poll()/whatever based method of having
a single process handle multiple requests simultaneously. In sorts,
its a somewhat more tricky problem than the parallelisation options
that are already supported.
Lastly, ldirectord does include some code such that if the same
real-server is present in multible virtual-services (that will
be checked by the same ldirectord process), then the check
is only preformed once per loop, rather than once for each
virtual-service that it appears in. If there are several
virtual-services mapping onto the same group of real-servers
this can be a big win.