is that possible to queue request one by one

chen cw crk_world at
Mon Oct 29 03:08:23 UTC 2012

On Fri, Oct 26, 2012 at 2:38 AM, Jossan Davis <jossandavis at> wrote:

> Hi
> nginx module limit_req only can limit request frequency by url param key.
> it delay a request by  "ngx_add_timer(r->connection->write, delay)".
> my requirement is a little bit different. i need the next request be
> process immediately after the prev one have done.
> i have tried to use "ngx_http_cleanup_add". but it seem that the
> ngx_http_request_t is not in shared mem,  i can't use
> "ngx_add_timer(r->connection->write, 0)" to notify the next request.
you can store the counter in share mem as module limit_req, and also store
blocked requests list in global queue for each worker, such as module
upstream_keeplive. so when you use "ngx_http_cleanup_add", you can get the
ngx_http_request_t in such list. I think this method meets your requirement.



Charles Chen

Software Engineer

Server Platforms Team at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx-devel mailing list