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

highclass99 highclass99 at gmail.com
Fri Jan 22 00:58:23 UTC 2016


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160122/b61d486d/attachment.html>


More information about the nginx mailing list