Proxy handler to multiple servers for single request.

forum_id nginx-forum at
Fri Nov 4 11:00:53 UTC 2011

I have requirement where proxy handler needs to talk to multiple server
before sending request to actual server where it gets processed. For
example proxy handler receives user request, talks to virus scanner to
see user data contain any virus or not then only forward to actual
server. Here virus scanner may be another server or a thread part of
nginx. My doubts are

1) When I went through proxy module, ngx_http_proxy_create_request is
the callback responsible to prepare request to send to another server.
As per understanding, I need to call here virus scanner before sending
request. Is it correct? Or is there any other place I can do this work?
In this function if I call virus scanner API's, how will the request
forwarded the server which serves request?

2) How to make it asynchronous with out effecting nginx's performance.


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

More information about the nginx mailing list