Dear,
I've built a nginx module (simply hooks the content handler) to receive client request, do calculation, send response. Intuitively, I expect nginx to create thread for each incoming request, and process requests in parallel. However, if "do calculation" part takes long time ( eg: sleep(10) ), incoming request will be consumed one by one in serial. Since nginx is event-driven rather than threading, I think there would be some way to write non-blocking content handler. Could you please give me some hints? Is there any document / example related to this topic? Thank you in advance.
--
ShenLei