Welcome! Log In Create A New Profile

Advanced

I'm not sure how "hash $cachekey" works...

January 21, 2016 07:42AM
I have a question about "hash $cachekey" consistent;
Would the following Config 1, Config 2, Config 3 be exactly the same of
different?
i.e. if I swap the configurations would the cache keys stay consistent?
The reason I am asking is I have a large configuration similar to Config 2
and am not sure it would be "safe" to clean up the order and merge
duplicates as weighted config values.

Thank you.

Would the following be different of the same?
Config 1:
upstream ImageCluster {
server 10.1.1.1;
server 10.1.1.1;
server 10.1.1.2;
server 10.1.1.2;
server 10.1.1.3;
server 10.1.1.3;

hash $cachekey consistent;
}

Config 2:
upstream ImageCluster {
server 10.1.1.2;
server 10.1.1.2;
server 10.1.1.1;
server 10.1.1.1;
server 10.1.1.3;
server 10.1.1.3;

hash $cachekey consistent;
}

Config 3:
upstream ImageCluster {
server 10.1.1.1 weight=2;
server 10.1.1.2 weight=2;
server 10.1.1.3 weight=2;

hash $cachekey consistent;
}
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

I'm not sure how "hash $cachekey" works...

highclass99 January 21, 2016 07:42AM

Re: I'm not sure how "hash $cachekey" works...

Roman Arutyunyan January 21, 2016 11:08AM

Re: I'm not sure how "hash $cachekey" works...

highclass99 January 21, 2016 07:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 111
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready