What is the recommended way to swap hash consistent servers (with least sudden hash change)

Hello,
If I have the following config

upstream ImageCluster {
server 10.1.1.1;
server 10.1.1.2;
server 10.1.1.3;

hash $cachekey consistent;
}

and wish to swap 10.1.1.3 to 10.1.1.5
would it be better to delete 10.1.1.3, restart and wait for the hash
keys
to update,
add 10.1.1.5 and then restart,

or just delete and swap 10.1.1.3 with 10.1.1.5 all at once?

Also do you think it’s a good strategy to add weightings so I can slowly
decrease the weightings value and restart nginx serveral times until the
weighting becomes 0, so that it will slowly change the keys?

Thank you.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs