On Fri, Dec 10, 2010 at 16:46, Roberto De Ioris <[email protected]> wrote: > > Regarding the second setup, I have to choose sockets/ports for each > > application and type that information twice: once in nginx config and once > > in supervisord config (this is the process manager we use). Maybe I should > > use a configuration tool like fabric. > > This is the main issue (doing double configurations), so my suggestion is > looking at this wiki page: > > http://projects.unbit.it/uwsgi/wiki/CustomRouting > > It is for 0.9.7-dev but you can use the development version for routing > and the stables one for your apps
I read the wiki page as you suggested. Thanks to custom routing, I can point nginx to a "main" uWSGI instance that will route each request to the appropriate "application" uWSGI instance. nginx only needs to know the socket of the "main" uWSGI instance. This simplifies nginx configuration. But I still have to launch one uWSGI instance for each application, using a process manager like supervisord. My question: Is it desirable and feasible to keep the idea of "dynamic applications", using the UWSGI_SCRIPT parameter, but instead of running the application in a sub-interpreter, run it in new worker process? Maybe we could have something along the line of mod_wsgi daemon mode, automatically launching a worker process for each application, killing the process if it is inactive for too long, and reload it if the script file was changed. Not sure if it is a good or bad idea... Nicolas Grilly _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
