Launch FastCGI process?
Roger Hoover
roger.hoover at gmail.com
Wed Oct 21 22:02:56 MSD 2009
Hi Grzegorz,
This is great news. I can't wait to try it out. Thanks!
Roger
On Tue, Oct 20, 2009 at 11:48 PM, Grzegorz Nosek
<grzegorz.nosek at gmail.com>wrote:
> On wto, paź 20, 2009 at 01:26:24 -0700, jlist9 wrote:
> > My understand is that nginx doesn't launch a process, being it a CGI
> process
> > or FastCGI back-end server. I wonder what are the reasons behind this
> decision.
> > I used to use another web server that takes care of launching FastCGI
> processes.
> >
> > The nice thing about it is that the web server checks if a backend
> process is
> > running. If not, it automatically starts it. This means, for whatever
> reason if
> > the backend process crashes, it will be re-launched. Also, the web server
> > gets to control how many back-end server processes to start, according
> > to the conf file. With this managing the processes is really easy,
> because
> > it's all managed by the web server.
> >
> > This is a very handy feature. Any chance of having this in nginx?
>
> We've been looking into it for quite some time but eventually decided
> against it (we being mostly myself and I am definitely not speaking for
> Nginx developers). Nginx supports some weird features like upgrading
> binaries on the fly, which doesn't mesh with managing processes at all.
> Or do you want to restart your application servers because you've just
> made a "zero-downtime" upgrade of Nginx? Not so zero-downtime any more,
> is it?
>
> Like fellow posters said, spawning processes by the web server is not
> a good idea (especially by a lean and mean server like Nginx). What
> we're using (or at least migrating to) is supervisord[1] for process
> management and a custom Nginx module for integration. We have Nginx
> communicate with supervisord over XMLRPC to start/shutdown processes as
> directed by the load balancer. Supervisord provides process management
> way above Nginx could offer, while Nginx provides load data in real
> time, so we have exactly as many backends as we need.
>
> If you aim for simply running a pool of backends, look at supervisord,
> period.
>
> If you also want to size the pool dynamically, watch this space :)
> ngx_supervisord isn't yet available (still waiting for finishing
> touches) but consider this a pre-announcement. It's going to require
> patches to the load balancer but if you're using upstream-fair, the
> patch comes with the module source.
>
> Best regards,
> Grzegorz Nosek
>
> 1. http://www.supervisord.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20091021/61d13c5f/attachment.html>
More information about the nginx
mailing list