RE: Separating Application and Server

"Paul Connolly" <pconnolly-h99mcivLOc80n/[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Hi there,

We run Apache on our application servers as well, using only the FCGI
process manager part (ie, Apache on the app server does not serve HTTP
requests).  Eg, in the app server config, we have,

    FastCGIServer "c:/Website/fcgi-bin/DoStuff.exe" -port 10003

This starts a copy of DoStuff.exe on the application server when apache
is started, listening on port 10003.  (Check out the docs for other
config details you can have in fastcgiserver.)  

Then, in the web-server config, we have:

    FastCGIExternalServer "c:/WebSite/fcgi-bin/DoStuff.exe" -host
<appsvr ip addr>:10003

Where <appsvr ip add> should be replaced with the IP address of the
application server.

The beauty of this is that if something happens to your application, the
FCGI process manager politely starts you a new copy of the application.
The only downside we face is that the number of FCGI processes running
on the application server is static, but have not yet found this to be a
problem.

We are currently running under Windows for both the web and application
servers - but have had successful test runs with a couple of flavours of
Linux also - the concept works fine regardless of O/S.

Regards,

Paul Connolly


-----Original Message-----
From: Sam Vilain [mailto:sam-s9IUA/[email protected]] 
Sent: Monday, 8 November 2004 8:43 AM
To: Nahemoth
Cc: fastcgi-developers-xGejAJT2w6yOE5Ap4OspEtHuzzzSOjJt@public.gmane.org
Subject: Re: [FASTCGI] Separating Application and Server

Nahemoth wrote:
> I want to separate the web server from the fastcgi application in
> different computers connected in the same network. But I don't know
> how to do that. How is the communication between the fcgi application
> and the web server? When I execute a fastcgi process (in linux) it
> exits and uses the screen as standard output. Is there any specific
> way to execute the fastcgi program? How do they know ip address and
> port for the data exchange?

In your web server, you will need to set up an `external' FastCGI
server.  When you do that, you will set up the hostname and port
combination.  See the FastCGIExternalServer config directive if you
are using Apache.

When you start your application, you will need to tell it the port
(and maybe IP) to listen on.  If your application is Perl and uses
CGI::Fast, you can set the environment variable FCGI_SOCKET_PATH to
something like :3000 or hostname:3000.
-- 
Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13
(include my PGP key ID in personal replies to avoid spam filtering)

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.