[lvs-users] RFC: Forking ldirecterd [PATCH]

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] RFC: Forking ldirecterd [PATCH]
From: "Ryan Castellucci" <ryan.castellucci@xxxxxxxxx>
Date: Wed, 28 Nov 2007 01:56:18 -0800
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.

Other things to note

$0 is set for the children so you can see what virtual server each is
managing, and what real server it's checking from ps

All children are supervised by the parent, and restarted if they exit.

Due to issues with state tracking, when a child starts, it forces all
of it's real servers down until it rechecks them.  This fixed issues
with the state of the real servers changing between when a child dies
and when it is restarted.

Reloading the config kills all children due to not being able to muck
about with their state.  Due to reasons stated above, this may cause a
brief service interruption.

I'd like feedback on this patch, and any constructive criticism,
suggestions, bug fixes, etc are welcome.

Do please note that I coded this after being sick and awake for about
20 hours straight (cough was keeping me up), so it probably isn't my
best work.

Standard disclaimer: This is not well tested code.  Don't run it in
your massive data center.  If you do anyway, I'm not responsible for
any failures that result from it's use.

Ryan Castellucci

<Prev in Thread] Current Thread [Next in Thread>