multiple processes on remote host

Nat Holder (
Wed, 23 Apr 1997 12:55:52 -0500 (EST)

Date: Wed, 23 Apr 1997 12:55:52 -0500 (EST)
From: Nat Holder <>
To: FastCGI Mailing List <>
Subject: multiple processes on remote host
Message-Id: <Pine.NXT.3.95.970423110734.5261G-100000@litoria>


I'm using Apache 1.2b6 and fastcgi 1.4.3.
On machine A is the apache httpd, and on machine B is a database and a
fastcgi program.  I'd like to be able to start mutiple programs on B and
have apache chose the one that is free, as is done with local programs
using the AppClass -processes.  Has anyone come up against this problem
and have any insight into its solution?

What I've realized so far that it's not possible for more than one program
to listen on a tcp socket
(using cgi-fcg -start -connect :8888 <script_name>)

I'm not sure how to get over this aside from writing some sort of program
to run on Machine A which then gives an HTTP Location: header for the path
on A which points to a free fastcgi program on B.  There would then be 
multiple programs on B listening on different ports.  This raises several
questions and concerns:
1) How does a program on A figure out whether the fastcgi app on B at a
particular port is busy or free?
2) This would all be not very efficient

Of course, this whole problem would go away if I could fork a thread on B
in the fastcgi program for each connection (I've tried this, and the
multiple IO streams don't work over a single socket).

Thank you for any help.  I've looked through the mail archives but haven't
found anything.

-Nat Holder