no performance improvement on nginx reverse-proxy

Igor Sysoev igor at sysoev.ru
Wed Oct 13 10:27:16 MSD 2010


On Wed, Oct 13, 2010 at 05:18:14PM +1100, SplitIce wrote:

> The only time you will see a performance increase from nginx as a reverse
> proxy is when you need features that apache does badly like keep alive.

Not only keep alive - just long enough download, even 1 second:
if an Apache process creates response in 50ms, there is no sense to keep 
the huge process bound to a slow client for 1s, because the process
can create resposnes for 20 clients for this second.

> On Wed, Oct 13, 2010 at 5:11 PM, Cliff Wells <cliff at develix.com> wrote:
> 
> > On Wed, 2010-10-13 at 12:33 +0800, yung wrote:
> >
> > > After testing for some times (have been changing the arugments for
> > > http_load), I found nginx with reverse-proxy is not better than the
> > > realserver.
> > > Even the result is worse for accessing nginx than access apache directly.
> >
> > > So how do you think about it?
> > > Suggestions are welcome. Thanks.
> > >
> >
> > If you use a Ferrari to tow a dump truck, you will find that the dump
> > truck actually goes slightly faster on its own.
> > In short, there are so many bottlenecks in your test setup (Apache, CGI,
> > database) that the speed differences you see are probably not even
> > statistically significant.
> >
> > Further, it's not clear at all why you think adding additional layers of
> > processing (a proxy) to your stack would somehow magically speed things
> > up.   *Of course* it will be slower.   How could you ever expect
> > anything different?   The typical use-case of Nginx in front of Apache
> > is to allow Nginx to serve static resources to take the load away from
> > Apache.   You could also use some of Nginx' caching features to take
> > load off Apache.   You did none of these things.   I think you need to
> > think harder about what you are testing.


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



More information about the nginx mailing list