upstream keepalive: call for testing

Maxim Dounin mdounin at mdounin.ru
Wed Jul 27 14:38:24 UTC 2011


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).

Maxim Dounin



More information about the nginx-devel mailing list