Welcome! Log In Create A New Profile

Advanced

ip_hash in active_active nginx setup

s_n
May 21, 2015 12:14PM
Hi all,

we want to use a F5 loadbalancer in front of two nginx instances, which balance the load to our app-nodes.

The F5 loadbalancer distributes incoming requests via round-robin algorithm to the two nginx instances.

The nginx instances should be configured to use ip_hash to distribute the requests to the addnodes ensuring sticky sessions. Specific customer requirements make the use of cookies to ensure sticky sessions impossible.

I understand, that all nginx instances use the same function to hash the IP adress. But i am not sure if the distribution of the hash values to the appnodes happens in a consistent way.

I came across the following discussion on github which indicates that the same IP address may be forwarded to different appnodes in the scenario described above:

http://serverfault.com/questions/511763/do-multiple-nginx-servers-load-balance-the-same-ip-address-to-the-same-backend-w

Long story short / tl;dr:

Will different nginx instances forward requests from the same IP always to the same appnode when using ip_hash as a load balancing method?

Thanks,
Subject Author Posted

ip_hash in active_active nginx setup

s_n May 21, 2015 12:14PM

Re: ip_hash in active_active nginx setup

Maxim Dounin May 21, 2015 02:34PM

Re: ip_hash in active_active nginx setup

itpp2012 May 21, 2015 03:02PM

Re: ip_hash in active_active nginx setup

s_n May 28, 2015 05:49AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready