How to implement handshake in an upstream module?

Reetesh Ranjan reeteshr at outlook.com
Mon Jan 20 07:59:37 UTC 2014


Hi,
This is about using keepalive.
As I worked on another nginx module, I saw more about 'keepalive'. I see how you have used 'keepalive=1' on 'length == 0' and similar stuff can be seen in memcached module as well. When I was doing the sphinx module I got away with working behavior with the default nginx unbuffered filter because the sphinx service closed the socket after the response and I did not have to play with upstream in_headers to say how much is remaining to read. So it seems if I had to get the advantage of 'keepalive', I need to modify the sphinx service behavior. :-(

Regards,Reetesh

From: reeteshr at outlook.com
To: nginx-devel at nginx.org
Subject: RE: How to implement handshake in an upstream module?
Date: Fri, 6 Dec 2013 11:56:41 +0530




Hi!
> Date: Thu, 5 Dec 2013 13:23:55 -0800
> Subject: Re: How to implement handshake in an upstream module?
> From: agentzh at gmail.com
> To: nginx-devel at nginx.org
> 
> You're essentially doing pipelined requests here and you will run into
> the following limitation in the nginx core:
> 
>     http://mailman.nginx.org/pipermail/nginx-devel/2012-March/002040.html
> 
> I ran into this when testing my ngx_redis2 module's pipelined request
> feature and my patch in that thread will help you :)
Thanks for the info. :)
> Also, you may also want to deal with keepalive connections in your
> module in the future and you will want to save the handshake for
> reused connections (from the connection pool).
Yeah, this is on the table for obvious performance reasons. I saw how you have put that upfront for redis, and that is really good. :)
> 
> Regards,
> -agentzh
> 
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
 		 	   		  

_______________________________________________
nginx-devel mailing list
nginx-devel at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140120/774c8a12/attachment.html>


More information about the nginx-devel mailing list