how nginx handle connection with backend web server?

Igor Sysoev is at rambler-co.ru
Mon Aug 10 13:10:30 MSD 2009


On Mon, Aug 10, 2009 at 05:00:05PM +0800, Xuepeng Li wrote:

> if it's is 1:1 module and nginx establishes  HTTP 1.0 only to apache
> server,  every time enginx receive a request, it has to proxy the request to
> apache server, what is the advantange make enginx as reverse proxy  other
> than make direct connection between browser and apache?

The main nginx advantage is that it gets quickly whole response from backend
and frees it to handle other requests. If your responses are small, then
nginx will be just useless overhead.

> 2009/8/10 Joshua Zhu <zhuzhaoyuan at gmail.com>
> 
> > Hi,
> >
> > 2009/8/10 ????????? <xuepeng.li at gmail.com>:
> > > So,  it means that client (browser) will get a 5** error ?
> > > if this,  what's the meaning of enginx high concurrent connection ?
> > >
> > > 2009/8/10 Weibin Yao <nbubingo at gmail.com>
> > >>
> > >> ????????? at 2009-8-10 10:37 wrote:
> > >>>
> > >>> hi all
> > >>> i have a question that how nginx handle connection with backend web
> > >>> server ?
> > >>> for example, i have a nginx server for receiving client request, and
> > >>> reverse proxy to backend 2 web server(such as apache server), every
> > apache
> > >>> server have 100 child process(prefork module). so, if there are 1000
> > client
> > >>> requests, how nginx map 1000 requests to only 200 apache server
> > process?
> > >>>
> > >> Nginx can handle more than 10000 concurrent connections, but apache with
> > >> prefork's max concurrent connections is the number of its process
> > number. So
> > >> Apache will send the 5** error.
> > >>
> > >> --
> > >> Weibin Yao
> > >>
> >
> > It's 1:1 model actually and for now nginx establishes HTTP 1.0
> > connections only.
> >
> > In your circumstance, you use nginx as a reverse proxy, hence it's not
> > nginx but your upstream's duty to handle real connections, I.E., your
> > upstream's capacity must be big enough, otherwise, it will become the
> > bottleneck.
> >
> > Cheers!
> >
> > --
> > Joshua Zhu
> >
> >

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list