Re: Running a service as External Server
Ken Gustafson <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Fabrizio, On 12/13/05, Fabrizio Pacini <[email protected]> wrote: > Hi all, > I'm running successfully my application as a fastcgi (dynamic/static) > server > behind an Apache 2 http server. I need to run it also as an external > server and > I have the following questions: > > 1. do I have to modify my application to run it as a fastcgi external > server? > 2. how do I tell my application on which port/socket it has to listen when > running as an external fastcgi external server? As David replied, you pass the port option. Without checking my notes, I believe it's something like this (on the external machine): cgi-fcgi -start -connect :port# path/to/appname (Search for '-connect' in mail archive also for info on setting up Apache's config file properly.) > 3. can I place several instances of my application on multiple external > hosts > and make all of them reachable from a single Apache 2 server (i.e. a > single > access point for user's requests that then dispatched to the external > servers)? > 4. if answer to point 3. is yes, is there some sort of load balancing > enforced by > fastcgi? As David replied, nothing exists within fastcgi itself, so you'll have to roll your own. I've used a (very) crude, round-robin, scheme: Each external server (machine) is given a number (say 0-2). A small (dynamic or static) modulo counter runs on the Apache machine. As my 'user data input' page loads, it gets the next number from the counter. This number is inserted in the form's action tag (via SSI), which will rotate requests between the different machines. Each "#.fcgi" app needs to be added to Apache's config file. HTH. > > Thanks in advance, > > -- Fabrizio -- > > ......................................................................................................... > Fabrizio Pacini > > Project Leader > Grid R&D Group > Government and Institutions Division > > DATAMAT S.p.A. > Via Laurentina, 760 I 00143 Rome Italy > http://www.datamat.it > mailto: [email protected] > Phone: +39 06 5027 4573 (direct) > +39 06 5027 4571 (secretary) > Fax: +39 06 5027 2500 > > > ___________________________________ > fastcgi-developers mailing list > http://fastcgi.com/fastcgi-developers/ > ___________________________________ fastcgi-developers mailing list http://fastcgi.com/fastcgi-developers/