upstream+ip_hash: hash valid global?

revirii nginx-forum at nginx.us
Thu Sep 26 10:42:44 UTC 2013


Hello,

i have 2 upstreams, each with 3 backend servers, where backendA is the same
backend in both upstreams.

upstream one {
    server backendA;
    server backendB;
    server backendC;
}

upstream two {
    server backendA;
    server backendD;
    server backendE;
}

A user with his IP sends a request, gets passed to upstream one and is sent
to backendA. Shortly after that he sends a different request and gets passed
to upstream two - will he be sent to backendA as well?

So the question is: is ip_hash global in nginx, i.e. a user always is sent
to the same backend (if available), independent from an upstream? Or is
ip_hash upstream-specific, i.e. nginx hashes per upstream?

thx in advance
revirii

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



More information about the nginx mailing list