Dedicatng a worker to a single URL ?
thierry.magnien at sfr.com
Wed Sep 26 10:27:13 UTC 2012
The task is internal to the module: either updating memory with data from the POST request itself, or triggering memory update from an external source. But in both cases I need data to be in nginx shared memory, not in an external source to which I could proxy.
De : nginx-devel-bounces at nginx.org [mailto:nginx-devel-bounces at nginx.org] De la part de Tom van der Woerdt
Envoyé : mercredi 26 septembre 2012 12:20
À : nginx-devel at nginx.org
Objet : Re: Dedicatng a worker to a single URL ?
What kind of task is performed? Is it in a nginx module or an external
I usually use a simple uwsgi or fastcgi setup for these. Simply only
spawn one worker, then make nginx proxy it there. Nginx shouldn't be
handling the hard tasks itself, and proxying is non-blocking, so for me
this solution has always been ideal.
Op 9/26/12 12:07 PM, MAGNIEN, Thierry schreef:
> I'm writing an nginx module that needs to perform a quite long task when receving a POST request on a defined URL. However, at the moment, the worker that took the request is blocked until the task finishes, blocking possibly several dozens of GET requests.
> I would like to avoid this, so is there a way to dedicate a worker for this URL only ? In such a case, GET requests would be treated by other workers, therefore not blocked when the POST request comes in.
> Or could I "spawn" a separate thread for the task and release the worker asap ?
> nginx-devel mailing list
> nginx-devel at nginx.org
More information about the nginx-devel