upstream keepalive with upstream hash

beaufour nginx-forum at nginx.us
Fri Mar 15 19:48:56 UTC 2013


I've been trying to get this setup working:
client <- c0 -> nginx1 <- c1 -> nginx2 <- c2 -> service (http)

where the c1 connection is kept alive between request from from the outside,
but c0 and c2 are closed after each request. I've used the 'keepalive'
keyword in the upstream nginx1 config, and it works. Unfortunately I also
use the upstream hash patch on nginx1, and as soon as I enable that nginx1
closes the connection forcefully. I've confirmed this with tcpdump in both
setups, and it's the only difference. Any hints to what I can do?

I'm suspecting that the upstream hash module "takes over" the upstream
handling, and thus ignores the 'keepalive' keyword, but I'm randomly
guessing.

Thanks,

Allan

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,237417,237417#msg-237417



More information about the nginx mailing list