We are using nginx for load balancing. We just pushed a new server online with a massive upgrade to our platform for testing before we roll it out. We want to make sure it's working for, so we have weights set to send roughly 10% of the traffic to that server.
The problem is that we need to ensure that if the user is servers that server, they will always get that server for future sessions. This is easily done with ip_hash
, but what we really want is for the other services to use a round-robin strategy while ONLY that one server uses ip_hash.
Is something like that possible at all? Here is our upstream.conf
upstream apps {
ip_hash;
server 10.134.13.38:80 weight=3; # app-00
server 10.134.13.46:80 weight=3; # app-01
server 10.134.24.30:80 weight=3; # app-02
server 10.134.8.153:80 weight=1; # app-new-test
}