You weren't kidding, this setup is quite a bit more complex to
understand. I do have a few questions though.

1. What exactly is fastrouter and what is its job?
2. This setup will not prevent the overload of processes from the
emperor correct? It seems like if there is a little bit of traffic all
over the farm then there will be many processes active.
3. Something very common in our applications is for a website to
contain a *.hostname, will this still work?

It's frustrating because uWSGI is so close to doing exactly what I
want it to. It's still by far the best process manager for my use case
yet.

I think what I might do is just monitor the app files in my own
process and issue a HUP when they change. Hopefully I can just dodge
the memory issues from loading a bunch of applications at once for
now. I will experiment with this example first though.


My official feature request is to allow passing of a touch-reload and
an idle command from nginx.
For example:
uwsgi_param UWSGI_TOUCH_RELOAD module;
uwsgi_param UWSGI_IDLE 300;
or
uwsgi_param UWSGI_TOUCH_RELOAD directory/file.py;
uwsgi_param UWSGI_IDLE 3600;




On Sat, Jun 18, 2011 at 12:15 PM, Roberto De Ioris <[email protected]> wrote:
>
> Il giorno 18/giu/2011, alle ore 18.10, Trey Long ha scritto:
>
>> I recently posted a serverfault question about how to achieve a setup
>> that has the following characteristics:
>>
>> 1. Easy to deploy, really easy. As easy as PHP and PHP-FPM.
>> 2. Seldom used applications would take no resources and oft used
>> applications would be active constantly.
>> 3. Reloading for code changes isn't a giant pain in the ass.
>>
>> http://serverfault.com/questions/281671/uwsgi-virtualhost-mode-with-touch-reload
>>
>> That link contains all of the details and issues that I've run into.
>> To summarize; I was able to mostly achieve all of this using
>> virtualhost mode. However, all of the applications need to be idle for
>> the "idle" option to collect resources. From my tests it appears that
>> if I'm running 10 applications all 10 will remain in memory until they
>> are all idle for the specified seconds, even if only one application
>> is receiving traffic.
>>
>> The other issue was with touch-reload. I could not use touch-reload to
>> reload a specific application on change. In virtualhost mode it would
>> be nice if it were possible to automatically or through specification
>> monitor the specific module that the application loads. Each app has
>> it's own local entry point but the touch reload feature is a global
>> one.
>>
>> Emperor mode was a near alternative but it complicates the webserver
>> config, each app requires its own socket/file and I am worried that
>> loading 10 applications would cause a massive amount of resident
>> processes.
>>
>> Any insights, or suggestions would be appreciated.
>> Trey Long
>>
>
> Look at two of the new examples posted today
>
> http://projects.unbit.it/uwsgi/wiki/Example#massivedjango
>
> and
>
> http://projects.unbit.it/uwsgi/wiki/Example#massiverails
>
> they have a higher learning curve on startup but after that you can 
> add/remove apps in no time and without reloading/reconfiguring the webserver.
>
> --
> Roberto De Ioris
> http://unbit.it
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to