On wto, paÅº 20, 2009 at 01:26:24 -0700, jlist9 wrote:
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,
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 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,
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.