ip_hash load balancer incompatible with IPv6 compat. sockets
mdounin at mdounin.ru
Tue Jan 31 15:19:30 UTC 2012
On Tue, Jan 31, 2012 at 07:46:46AM -0500, pamribeirox wrote:
> I'm using nginx to distribute the load over 3 webservers using the
> ip_hash method.
> When the listening socket is IPv4/IPv6 compatible ( listen [::]:443; )
> only one of the backend servers are used.
> With the socket in IPv4 only mode ( listen 0.0.0.0:443; ) the module
> correctly distributes the load.
> It seems the hash isn't taking in account the size of the addresses and
> because the first 32bits of the struct in this mode doesn't seem to vary
> much the load balacing isn't working.
Yes, ip_hash only works with ipv4 addresses, it's not currently
able to handle ipv6 addresses (including v4-mapped ones).
More information about the nginx