I have written module for balancing traffic between some count of fcgi modules. So it's called mod_cookie_balancer. Module is watching what cookie was received and redirect request to corresponding fcgi module. Thus we have separate web-users for each fcgi.
Configuration should be like this:
server.modules = (
"mod_cookie_balancer",
"mod_fastcgi"
)
mimetype.assign = (
".html" => "text/html"
)
server.indexfiles = ("index.php", "index.html", "index.htm")
server.event-handler = "linux-sysepoll"
server.document-root = "/home/kir/hash/docroot"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
debug.log-file-not-found = "enable"
debug.log-request-handling = "enable"
server.bind="127.0.0.1"
server.port=8081
cb.count = 2
cb.prefix = "rpref"
cb.keyword = "userid"
fastcgi.debug = 1
fastcgi.server = ( "/rpref0" =>
(( "host" => "127.0.0.1",
"port" => 5051
)),
"/rpref1" =>
(( "host" => "127.0.0.1",
"port" => 5052
))
)
Module source attached.