upstream keepalive: call for testing

Igor Sysoev igor at sysoev.ru
Thu Jul 28 06:45:07 UTC 2011


On Wed, Jul 27, 2011 at 06:38:24PM +0400, Maxim Dounin wrote:
> Hello!
> 
> On Wed, Jul 27, 2011 at 03:43:44PM +0200, Thomas Love wrote:
> 
> > On 26 July 2011 13:57, Maxim Dounin <mdounin at mdounin.ru> wrote:
> > 
> > > Hello!
> > >
> > > Attached patch (against 1.0.5) introduces upstream keepalive
> > > support for memcached, fastcgi and http.  Note the patch is
> > > experimental and may have problems (though it passes basic smoke
> > > tests here).  Testing is appreciated.
> > >
> > >
> > Sounds great. Is it expected to work in this case:
> > 
> >  upstream fastcgi_backend {
> >        server unix:/tmp/php-fpm.sock
> >        keepalive 32;
> >    }
> 
> Yes (though I'm not sure if php is able to maintain connections 
> alive, but quick look suggests it should).
> 
> > And if so, is it expected to have a performance benefit?
> 
> Likely yes, but not a big one.  It will save several syscalls per 
> request, but you'll unlikely to notice compared to typical php 
> request processing costs.
> 
> Keepalive connections are mostly beneficial if response costs are 
> comparable with connection establishment costs (i.e. over 
> high-latency links or with really fast backends).

I saw reports that on busy filesystem on FreeBSD unix socket connection
establishment may be slow since these sockets uses the same kernel code
path as usual filesystems.


-- 
Igor Sysoev



More information about the nginx-devel mailing list