Welcome! Log In Create A New Profile

Advanced

Re: how nginx handle connection with backend web server?

Xuepeng Li
August 10, 2009 06:35AM
yes, I know enginx coule handle many many connections(for example, 30000),
and I know how engix do it with static files. It's amazing !

my quest is:

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 ?

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?

"The main nginx advantage is that it gets quickly whole response from
backend
and frees it to handle other requests."

Sorry, I don't understand how enginx could "get quickly whole response",
the response time is decided by apache server(business logic), why enginx
could do it more quickly than direct connetion ?

3ks

---Xuepeng


2009/8/10 Igor Sysoev

> 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
> >
> > > Hi,
> > >
> > > 2009/8/10 ????????? :
> > > > 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
> > > >>
> > > >> ????????? 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/
>
>
Subject Author Posted

how nginx handle connection with backend web server?

Anonymous User August 09, 2009 10:37PM

Re: how nginx handle connection with backend web server?

张立冰 August 09, 2009 10:54PM

Re: how nginx handle connection with backend web server?

Weibin Yao August 09, 2009 10:59PM

Re: how nginx handle connection with backend web server?

Anonymous User August 09, 2009 11:33PM

Re: how nginx handle connection with backend web server?

Joshua Zhu August 10, 2009 12:03AM

Re: how nginx handle connection with backend web server?

Xuepeng Li August 10, 2009 05:00AM

Re: how nginx handle connection with backend web server?

Igor Sysoev August 10, 2009 05:10AM

Re: how nginx handle connection with backend web server?

Xuepeng Li August 10, 2009 06:35AM

Re: how nginx handle connection with backend web server?

Jeff Waugh August 10, 2009 07:51AM

Re: how nginx handle connection with backend web server?

meto August 10, 2009 06:22PM

Re: how nginx handle connection with backend web server?

Jeff Waugh August 10, 2009 05:30AM

Re: how nginx handle connection with backend web server?

Joshua Zhu August 10, 2009 05:40AM

Re: how nginx handle connection with backend web server?

Anonymous User August 14, 2012 05:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 219
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready