Welcome! Log In Create A New Profile

Advanced

best approach for content phase handler to run again with event timer & ngx_done?

Anonymous User
May 30, 2014 05:28PM
If a content phase handler needs to wait on some potentially delayed
result, my understanding is that it should return NGX_DONE so that it is
called again.

I've been reading through the eval, echo, and http_limit_req modules to see
how to integrate an nginx_add_timer event prior to returning NGX_DONE. A
short timer event seems reasonable, because the content phase handler isn't
waiting on some other event type (subrequest result, timeout, etc). The
timer event seems fairly straight-forward -- configure the event in a
request context and set the event handler, data and log.

I don't really want my timer event handler to do anything -- rather I just
want the same content phase handler that had previously returned NGX_DONE
to run again. In that case, should my timer event handler actually do
anything at all? Is there a best practice for this -- i.e. have it point
to the write_event_handler(), call ngx_http_core_run_phases() or
ngx_http_run_posted_requests(), etc?

Thank you,

Ben
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

best approach for content phase handler to run again with event timer & ngx_done?

Anonymous User 825 May 30, 2014 05:28PM

Re: best approach for content phase handler to run again with event timer & ngx_done?

Maxim Dounin 350 June 02, 2014 12:28PM

Re: best approach for content phase handler to run again with event timer & ngx_done?

Anonymous User 447 June 02, 2014 02:06PM

Re: best approach for content phase handler to run again with event timer & ngx_done?

Maxim Dounin 524 June 03, 2014 07:58AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 121
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready