Dedicatng a worker to a single URL ?

Tom van der Woerdt info at tvdw.eu
Wed Sep 26 10:19:40 UTC 2012


Hi Thierry,

What kind of task is performed? Is it in a nginx module or an external 
source?

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.

Tom


Op 9/26/12 12:07 PM, MAGNIEN, Thierry schreef:
> Hi,
>
> 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 ?
>
> Thanks,
> Thierry
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3729 bytes
Desc: S/MIME-cryptografische ondertekening
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20120926/bdc281cf/attachment.bin>


More information about the nginx-devel mailing list