<html><P>Hello,</P>
<P>I am working on an nginx module. The simplest description of what it has to do can be summed up as a "voting based fault tolerance algorithm".&nbsp; </P>
<P>Example:</P>
<P>A) the client requests that an URL be tested. It does so by simply requesting the URL with an http GET</P>
<P>B) the headend nginx server (which has my module in it...) receives the request and passes the request on to three or more upstream servers... upstream1, upstream2, and upstream3</P>
<P>C1) upstream1 returns "ABCD" as a response</P>
<P>C2) upstream2 returns "ABCD" as a resonse also</P>
<P>C3) upstream3 returns "BLAHBLAH-I-AM-BROKEN"</P>
<P>D) during this time, the headend server is waiting for all three upstream responses</P>
<P>E) when it has received all of the them or timed out, it compares the three responses</P>
<P>F1) If all three responses are the same, it simply passes the result on to the downstream client and closes the request</P>
<P>F2) If, as in this example, one or more responses do not match, then my module does some processing and composes an appropriate response to the downstream client and closes the request</P>
<P>I humbly request your collective thoughts on the best way to accomplish this.</P>
<P>It appears that while round robin upstream requests are already possible, such that I could change it to, in a sequential manner, send the request to each upstream in turn (simulating a failure condition of an upstream and moving on to the next) - I would prefer to create three or more --&gt;parallel&lt;-- requests.&nbsp; The upstream entries in the header files imply to me that the nginx design is one request/one upstream at a time...&nbsp;&nbsp; </P>
<P>Question: do you think that multiple parallel upstream requests are possible as a module and not a branch of the nginx source?</P>
<P>The design I am working on also has to create an arbitrary upstream message, pretty much a GET or a POST while doing the processing... This upstream message does not have to be blocking nor does it have to have any special processing.</P>
<P>Question: Is there a mechanism by which I can inject a request into the nginx queue as if it came from a downstream client?</P>
<P>Example: I have a module at location /test/something and location /some/data&nbsp; - the latter being an upstream server.&nbsp; If my module has to POST to /some/data, it would be nice to simply inject the POST request back into the server and let the server manage finding /some/data.</P>
<P>Thanks for any comments on my endeavor.&nbsp; I have studied Evan Miller's guide to module development and have followed the forum intently when internals have been discussed.&nbsp; I am still learning nginx internals though...</P>
<P>Question: Is the any documentation or better yet, flow graphs, describing how requests are handled?</P>
<P>Thanks again,</P>
<P>Sincerely,</P>
<P>Daniel Chapiesky</P></html>
<font face=Times-New-Roman size=2><br><br>_____________________________________________________________<br><a href="http://thirdpartyoffers.juno.com/TGL2112/fc/Ioyw6iied4m2RusKuvsiDS5hgHDyzb5oMnJDbewj0s4btwoITkdu0B/?count=1234567890" target=_blank>Internet Security Software - Click here.</a><br></font>