Forum: NGINX ip_hash detailed behaviour

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
496966fbc4649e231a220efcbd5daac8?d=identicon&s=25 Martin Loy (Guest)
on 2013-11-15 18:14
(Received via mailing list)
Hello

I would like to know more about the behaviour of ip_hash when NGINX is
reloaded and in the scenario of removing an upstream node.

Is ip_hash somehow clever/sticky and would reasign the IPs to the same
node
after a reload or restart? and what would happen if an upstream node is
marked/flagged as down.

I'm not sure if this is the correct list or i should write to nginx-dev.

Regards

M
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2013-11-15 18:35
(Received via mailing list)
Hello!

On Fri, Nov 15, 2013 at 03:13:44PM -0200, Martin Loy wrote:

> Hello
>
> I would like to know more about the behaviour of ip_hash when NGINX is
> reloaded and in the scenario of removing an upstream node.
>
> Is ip_hash somehow clever/sticky and would reasign the IPs to the same node
> after a reload or restart?

The ip_hash just uses a hash function to distribute clients among
configured upstream servers.  If a number of upstream servers
changes, the distribution changes as well.

> and what would happen if an upstream node is
> marked/flagged as down.

In this case clients which are normally passed to the server
marked down will be distributed between other servers.

See http://nginx.org/r/ip_hash for more details.

--
Maxim Dounin
http://nginx.org/en/donation.html
This topic is locked and can not be replied to.