<span style="font-family:Arial;background-color:rgb(255,255,255);font-size:medium">Hi agentzh, <br><br></span>Thanks for detailed information. The IO operation we are doing doesn't support blocking calls. <br>I am thinking about two approach <br>
1. Either pre-forking multiple nginx worker(50). <br>or <br>2. Moving the IO operation I am doing to thread in my module so I can user nginx event based API and having ony 2 nginx worker process. <br><br>What do you suggest? Which one will be good approach ?<br>
Will having 50 or more nginx worker will cause extra time for client connect ? <br> <br><br><br clear="all">regards<div>Vivek Goel</div><br>
<br><br><div class="gmail_quote">On Tue, May 8, 2012 at 11:16 AM, vivek goel <span dir="ltr"><<a href="mailto:goelvivek2011@gmail.com" target="_blank">goelvivek2011@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry just clearing my doubt. <br>Again I have one doubt. <br>Work I am doing in  <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Arial;word-spacing:0px">clcf->handle </span>is a blocking io call<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Arial;word-spacing:0px"></span>. <br>

Now if I am running nginx with 2 worker process and function I am calling in clcf->handle takes 200 ms to generate response. <br>So it means that I will not able to server other clients from same worker process withing 200 ms time  ?<br>

<br>If yes , <br>  How can I make it non-blocking so that I can server multiple clients ?<br><br></blockquote><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>
<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks in advance for your reply. <br><br><br clear="all">regards<span class="HOEnZb"><font color="#888888"><div>Vivek Goel</div></font></span><div class="HOEnZb"><div class="h5"><br>
<br><br><div class="gmail_quote">On Mon, May 7, 2012 at 10:57 PM, vivek goel <span dir="ltr"><<a href="mailto:goelvivek2011@gmail.com" target="_blank">goelvivek2011@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

@Maxim<div>and what about handler function specified by   clcf->handler ?<br>Is it also blocking ?<br>and what about my others questions. Can I server multiple client using worker process ?</div><div><br clear="all">regards<span><font color="#888888"><div>


Vivek Goel</div></font></span><div><div><br>
<br><br><div class="gmail_quote">On Mon, May 7, 2012 at 8:19 PM, vivek goel <span dir="ltr"><<a href="mailto:goelvivek2011@gmail.com" target="_blank">goelvivek2011@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I am working on http module using nginx. <br>I have one question. <br><ol><li>Is function specified in <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;background-color:rgb(227,227,227);display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:monospace;word-spacing:0px">ngx_command_t</span> will be blocking call ?</li>



</ol>If not <br>My module description is as follow:<br>      It does read of file which is blocking call. That I think at same time worker process can't server the same client ?<br><br>The solution I am thinking is that I can do a blocking operation in one thread and call a callback to send response when response is ready. Is there a way I can tell worker process to start accepting the connection and server the response for old request when response is ready for that client?<br>



<br>Can you please suggest some better idea to server multiple client on blocking call with nginx http module ?<br><br><br><br clear="all">regards<span><font color="#888888"><div>Vivek Goel</div><br>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>