yes, I know enginx coule handle many many connections(for example, 30000), and I know how engix do it with static files. It&#39;s amazing !<br><br>my quest is:<br><br>if every request needs to get dynamic conetent(not static file, image, css ...),  nginx has to proxy the request to backend apache server. in this circumstance, if all apache server process have been occupied, then following requests have to wait until a apache server is released.  right ?<br>
<br>if we have 200 apache process  and all backend apache server are occupied, the other 29800 requests have to wait untile a apache process is freed or socket connection timeout?<br><br>&quot;The main nginx advantage is that it gets quickly whole response from backend<br>

and frees it to handle other requests.&quot;<br><br>Sorry,  I don&#39;t understand how enginx could &quot;get quickly whole response&quot;,  the response time is decided by apache server(business logic),  why enginx could do it more quickly than direct connetion ? <br>
<br>3ks<br><br>---Xuepeng<br> <br><br><div class="gmail_quote">2009/8/10 Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Mon, Aug 10, 2009 at 05:00:05PM +0800, Xuepeng Li wrote:<br>
<br>
&gt; if it&#39;s is 1:1 module and nginx establishes  HTTP 1.0 only to apache<br>
&gt; server,  every time enginx receive a request, it has to proxy the request to<br>
&gt; apache server, what is the advantange make enginx as reverse proxy  other<br>
&gt; than make direct connection between browser and apache?<br>
<br>
</div>The main nginx advantage is that it gets quickly whole response from backend<br>
and frees it to handle other requests. If your responses are small, then<br>
nginx will be just useless overhead.<br>
<div class="im"><br>
&gt; 2009/8/10 Joshua Zhu &lt;<a href="mailto:zhuzhaoyuan@gmail.com">zhuzhaoyuan@gmail.com</a>&gt;<br>
&gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
</div>&gt; &gt; 2009/8/10 ????????? &lt;<a href="http://xuepeng.li" target="_blank">xuepeng.li</a>@<a href="http://gmail.com" target="_blank">gmail.com</a>&gt;:<br>
<div class="im">&gt; &gt; &gt; So,  it means that client (browser) will get a 5** error ?<br>
&gt; &gt; &gt; if this,  what&#39;s the meaning of enginx high concurrent connection ?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2009/8/10 Weibin Yao &lt;<a href="mailto:nbubingo@gmail.com">nbubingo@gmail.com</a>&gt;<br>
&gt; &gt; &gt;&gt;<br>
</div><div><div></div><div class="h5">&gt; &gt; &gt;&gt; ????????? at 2009-8-10 10:37 wrote:<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt;&gt; hi all<br>
&gt; &gt; &gt;&gt;&gt; i have a question that how nginx handle connection with backend web<br>
&gt; &gt; &gt;&gt;&gt; server ?<br>
&gt; &gt; &gt;&gt;&gt; for example, i have a nginx server for receiving client request, and<br>
&gt; &gt; &gt;&gt;&gt; reverse proxy to backend 2 web server(such as apache server), every<br>
&gt; &gt; apache<br>
&gt; &gt; &gt;&gt;&gt; server have 100 child process(prefork module). so, if there are 1000<br>
&gt; &gt; client<br>
&gt; &gt; &gt;&gt;&gt; requests, how nginx map 1000 requests to only 200 apache server<br>
&gt; &gt; process?<br>
&gt; &gt; &gt;&gt;&gt;<br>
&gt; &gt; &gt;&gt; Nginx can handle more than 10000 concurrent connections, but apache with<br>
&gt; &gt; &gt;&gt; prefork&#39;s max concurrent connections is the number of its process<br>
&gt; &gt; number. So<br>
&gt; &gt; &gt;&gt; Apache will send the 5** error.<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt; --<br>
&gt; &gt; &gt;&gt; Weibin Yao<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt; It&#39;s 1:1 model actually and for now nginx establishes HTTP 1.0<br>
&gt; &gt; connections only.<br>
&gt; &gt;<br>
&gt; &gt; In your circumstance, you use nginx as a reverse proxy, hence it&#39;s not<br>
&gt; &gt; nginx but your upstream&#39;s duty to handle real connections, I.E., your<br>
&gt; &gt; upstream&#39;s capacity must be big enough, otherwise, it will become the<br>
&gt; &gt; bottleneck.<br>
&gt; &gt;<br>
&gt; &gt; Cheers!<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Joshua Zhu<br>
&gt; &gt;<br>
&gt; &gt;<br>
<br>
</div></div><font color="#888888">--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br>