How to write async http web client inside nginx code?

ajaybodhe nginx-forum at
Tue Aug 12 07:23:38 UTC 2014

I am writing an application server whose code will be written as nginx
module (c/c++). This server is supposed to send HTTP Requests to other
servers & wait for response from them for 200-400ms.

If I use libcurl to make http calls then the single thread of nginx will be
blocked & event loop will not accept further requests.

If I use some non blocking Libs like ASIO/LibUV then there will be two event
loops running?

How this problem of Async IO/Network-Req can be solved when code is written
as Nginx Module?

I am very new to this framework & want to get rolling ASAP.
Please forgive if this is very trivial one.

Posted at Nginx Forum:,252492,252492#msg-252492

More information about the nginx mailing list