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