Welcome! Log In Create A New Profile

Advanced

Selection of server in upstream directive using hash

October 09, 2017 03:36AM
I was wondering what the selection algorithm is for choosing a server in
the upstream directive using hash. Is the selection based on the ip of the
server or is it based on the position of the list.

So if I have for example the following configuration:

upstream test {
hash $arg_test;
server 10.0.0.10;
server 10.0.0.9;
server 10.0.0.8;
}

or (ip's in different order)

upstream chat {
hash $arg_test;
server 10.0.0.8;
server 10.0.0.9;
server 10.0.0.10;
}

If someone is targeting an url with ?test=1, is it in both configs directed
to the same ip or not. So is the selection based on the ip or based omn the
position in the list.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Selection of server in upstream directive using hash

rsdrsd October 09, 2017 03:36AM

Re: Selection of server in upstream directive using hash

Roman Arutyunyan October 09, 2017 05:26AM

Re: Selection of server in upstream directive using hash

rsdrsd October 09, 2017 05:54AM

Re: Selection of server in upstream directive using hash

Roman Arutyunyan October 09, 2017 06:24AM

Re: Selection of server in upstream directive using hash

rsdrsd October 11, 2017 05:48AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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