further "Hacking" the event model of Nginx

Vincent Huang lists at ruby-forum.com
Fri Jul 16 08:50:50 MSD 2010


Mauro Stettler wrote:
> you really need to specify more details about what you are doing. is
> that HTTP? what are you processing, maybe you don't need to hack
> anything, depending on what you do with the request...
Thanks for your help;-)
yes, it is HTTP. Our business logic is split into multiple tasks, they 
are deployed on multiple backend servers. We have a master server 
visible to the client. The master server need read client post data 
,modify the data and send to backend server1, the backend server1 also 
have nginx running, it should do a time consuming task. The master 
server received the response from backend server1 and send back to 
backend server2. backend server2 also do a time consuming task. the 
master server received the response and send back the client.
By now, I have the following design:

the master server handle the client request, it will modify the post 
body and bypass request to backend server1.(I may need to learn code in 
proxy_module and fastcgi_module)
problem:
How can I hook the response send back from backend server1? Can I use 
body filter module so that I can get the response body and send to 
backend server2 again?

the backend server logic is simple, it will invoke functions in dll.
problem:
the functions in dll is time consuming, Will it block the nginx?

Thanks again;-)

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list